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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java

Issue 2779543005: Add support for highlighting menu items (Closed)
Patch Set: Debugged drawable issues Created 3 years, 8 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
Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
index 8a2374ed1a590f215b71204e37d332be970b0659..ae2b8ef60f57efe887dbc3b007829c057a71a818 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
@@ -144,6 +144,7 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe
private int mFullscreenFocusToken = FullscreenManager.INVALID_TOKEN;
private int mFullscreenFindInPageToken = FullscreenManager.INVALID_TOKEN;
private int mFullscreenMenuToken = FullscreenManager.INVALID_TOKEN;
+ private int mFullscreenHighlightToken = FullscreenManager.INVALID_TOKEN;
private int mPreselectedTabId = Tab.INVALID_TAB_ID;
@@ -829,6 +830,21 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe
mFullscreenMenuToken = FullscreenManager.INVALID_TOKEN;
}
}
+
+ @Override
+ public void onMenuHighlightChanged(boolean highlighting) {
+ mToolbar.setMenuButtonHighlight(highlighting);
+
+ if (mControlsVisibilityDelegate == null) return;
+ if (highlighting) {
+ mFullscreenHighlightToken =
+ mControlsVisibilityDelegate.showControlsPersistentAndClearOldToken(
+ mFullscreenHighlightToken);
+ } else {
+ mControlsVisibilityDelegate.hideControlsPersistent(mFullscreenHighlightToken);
+ mFullscreenHighlightToken = FullscreenManager.INVALID_TOKEN;
+ }
+ }
});
mAppMenuButtonHelper = new AppMenuButtonHelper(menuHandler);
mAppMenuButtonHelper.setOnAppMenuShownListener(new Runnable() {

Powered by Google App Engine
This is Rietveld 408576698