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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java

Issue 317083005: [Android] Remove hardware menu button dragging support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed isByHardwareButton argument Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuDragHelper.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java
index 0091e454ae980bf99cad4290d419fb0759a6ddf5..0a08ad4a7053e8ed2b6dcb05d1bbc97ec43cd7f4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java
@@ -57,12 +57,14 @@ public class AppMenuHandler {
* @param startDragging Whether dragging is started. For example, if the app menu is
* showed by tapping on a button, this should be false. If it is
* showed by start dragging down on the menu button, this should
- * be true. Note that if isByHardwareButton is true, this is
- * ignored.
+ * be true. Note that if isByHardwareButton is true, this must
+ * be false since we no longer support hardware menu button
+ * dragging.
* @return True, if the menu is shown, false, if menu is not shown, example reasons:
* the menu is not yet available to be shown, or the menu is already showing.
*/
public boolean showAppMenu(View anchorView, boolean isByHardwareButton, boolean startDragging) {
+ assert !(isByHardwareButton && startDragging);
if (!mDelegate.shouldShowAppMenu() || isAppMenuShowing()) return false;
if (mMenu == null) {
@@ -93,7 +95,7 @@ public class AppMenuHandler {
mActivity.getWindow().getDecorView().getWindowVisibleDisplayFrame(appRect);
int rotation = mActivity.getWindowManager().getDefaultDisplay().getRotation();
mAppMenu.show(wrapper, anchorView, isByHardwareButton, rotation, appRect);
- mAppMenuDragHelper.onShow(isByHardwareButton, startDragging);
+ mAppMenuDragHelper.onShow(startDragging);
UmaBridge.menuShow();
return true;
}
@@ -157,11 +159,4 @@ public class AppMenuHandler {
mObservers.get(i).onMenuVisibilityChanged(isVisible);
}
}
-
- /**
- * TODO(kkimlabs) remove this call.
- */
- public void hardwareMenuButtonUp() {
- if (mAppMenuDragHelper != null) mAppMenuDragHelper.hardwareMenuButtonUp();
- }
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuDragHelper.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698