Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Issue 1292923004: Refactor chrome's action mode logics and namings (Closed)

Created:
5 years, 4 months ago by Ian Wen
Modified:
5 years, 4 months ago
CC:
chromium-reviews, darin-cc_chromium.org, ianwen+watch_chromium.org, jam, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/6b5e238f0ee7db98535c3b459d0a14194efccfc3 Cr-Commit-Position: refs/heads/master@{#344336}

Patch Set 1 #

Total comments: 6

Patch Set 2 : respond to comments #

Patch Set 3 : make webview to compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -788 lines) Patch
M android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java View 1 2 2 chunks +6 lines, -6 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java View 2 chunks +3 lines, -3 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentsClient.java View 2 chunks +3 lines, -3 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/TestAwContentsClient.java View 2 chunks +6 lines, -6 lines 0 comments Download
M android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java View 2 chunks +6 lines, -6 lines 0 comments Download
M android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java View 1 4 chunks +2 lines, -33 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/ContextualMenuBar.java View 1 chunk +0 lines, -197 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/CustomSelectionActionModeCallback.java View 1 chunk +0 lines, -110 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/document/DocumentActivity.java View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java View 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java View 1 7 chunks +10 lines, -10 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeSelectActionModeCallback.java View 1 chunk +0 lines, -31 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeTab.java View 1 2 chunks +6 lines, -6 lines 0 comments Download
A + chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeWebActionModeCallback.java View 1 2 chunks +3 lines, -3 lines 0 comments Download
A + chrome/android/java/src/org/chromium/chrome/browser/toolbar/ActionModeController.java View 1 9 chunks +25 lines, -29 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java View 3 chunks +2 lines, -3 lines 0 comments Download
A + chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarActionModeCallback.java View 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java View 9 chunks +15 lines, -17 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java View 2 chunks +4 lines, -4 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 3 chunks +5 lines, -5 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/SelectActionMode.java View 1 chunk +0 lines, -52 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java View 1 chunk +0 lines, -237 lines 0 comments Download
A + content/public/android/java/src/org/chromium/content/browser/WebActionMode.java View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java View 2 chunks +4 lines, -4 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 15 (6 generated)
Ian Wen
boliu@chromium.org: Please review changes in webview. dtrainor@chromium.org: Please review changes in chrome on android.
5 years, 4 months ago (2015-08-14 23:33:56 UTC) #2
David Trainor- moved to gerrit
chrome android changes lgtm with a few nits. https://chromiumcodereview.appspot.com/1292923004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeActionModeCallback.java File chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeActionModeCallback.java (right): https://chromiumcodereview.appspot.com/1292923004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeActionModeCallback.java#newcode20 chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeActionModeCallback.java:20: public ...
5 years, 4 months ago (2015-08-18 18:32:50 UTC) #3
boliu
rs lgtm
5 years, 4 months ago (2015-08-18 18:37:48 UTC) #4
Ian Wen
Thanks for the accurate comments, David. All addressed. https://codereview.chromium.org/1292923004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeActionModeCallback.java File chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeActionModeCallback.java (right): https://codereview.chromium.org/1292923004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeActionModeCallback.java#newcode20 chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeActionModeCallback.java:20: public ...
5 years, 4 months ago (2015-08-19 18:35:36 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292923004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292923004/20001
5 years, 4 months ago (2015-08-19 18:36:22 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/110481)
5 years, 4 months ago (2015-08-19 19:02:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292923004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292923004/40001
5 years, 4 months ago (2015-08-19 20:13:51 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 4 months ago (2015-08-19 21:38:29 UTC) #14
commit-bot: I haz the power
5 years, 4 months ago (2015-08-19 21:39:12 UTC) #15
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/6b5e238f0ee7db98535c3b459d0a14194efccfc3
Cr-Commit-Position: refs/heads/master@{#344336}

Powered by Google App Engine
This is Rietveld 408576698