Refactor chrome's action mode logics and namings
commit6b5e238f0ee7db98535c3b459d0a14194efccfc3
authorianwen <ianwen@chromium.org>
Wed, 19 Aug 2015 21:38:23 +0000 (19 14:38 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 19 Aug 2015 21:39:03 +0000 (19 21:39 +0000)
tree2417d24d038dd773dc950197e8d8635d03dc7dd0
parent7425951dbe9c6732b56e10058f018277a20573fd
Refactor chrome's action mode logics and namings

ActionMode is the standard naming for the copy-paste-select bar in
android. (http://developer.android.com/guide/topics/ui/menus.html) In
chrome on android, three types of ActionMode exist:
1. ContextualMenuBar and CustomSelectionActionModeCallback. This is for
toolbar and omnibox editing. On tablet, ContextualMenuBar controls the
animation to move toolbar downwards, hiding the tabstrip.
2. SelectionActionModeCallback and SelectionActionMode are content
layer concept for selecting strings inside of the webcontents.
3. ChromeSelectActionModeCallback is the same thing in chrome layer.

To make our naming more clear and more intuitive, several renamings are
proposed in this CL:
1. ContextualMenuBar -> ActionModeController. This class only handles
animation for toolbar, and it is essentially a controller/manager.
2. CustomSelectionActionModeCallback -> ToolbarActionModeCallback. This
callback only serves content editing in toolbar and omnibox.
3. SelectActionMode -> WebActionMode; SelectActionModeCallback ->
WebActionModeCallback. This renaming is to distinguish between
webcontents and android native views.

This CL also removes the unused code in ChromeTabbedActivity.

BUG=521194

Review URL: https://codereview.chromium.org/1292923004

Cr-Commit-Position: refs/heads/master@{#344336}
21 files changed:
android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java
android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
android_webview/javatests/src/org/chromium/android_webview/test/TestAwContentsClient.java
android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
chrome/android/java/src/org/chromium/chrome/browser/document/DocumentActivity.java
chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java
chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeTab.java
chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeWebActionModeCallback.java [moved from chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeSelectActionModeCallback.java with 80% similarity]
chrome/android/java/src/org/chromium/chrome/browser/toolbar/ActionModeController.java [moved from chrome/android/java/src/org/chromium/chrome/browser/ContextualMenuBar.java with 76% similarity]
chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarActionModeCallback.java [moved from chrome/android/java/src/org/chromium/chrome/browser/CustomSelectionActionModeCallback.java with 82% similarity]
chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
content/public/android/java/src/org/chromium/content/browser/WebActionMode.java [moved from content/public/android/java/src/org/chromium/content/browser/SelectActionMode.java with 88% similarity]
content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java [moved from content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java with 96% similarity]