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

Unified Diff: chrome/browser/extensions/extension_toolbar_model.h

Issue 476873002: Make hiding an extension action cause it to go to the overflow menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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/browser/extensions/extension_toolbar_model.h
diff --git a/chrome/browser/extensions/extension_toolbar_model.h b/chrome/browser/extensions/extension_toolbar_model.h
index b495f5d6e12d77d24bd1b0cc46b3066c66df8c33..05b143d89985dada27060394a545658677fd5364 100644
--- a/chrome/browser/extensions/extension_toolbar_model.h
+++ b/chrome/browser/extensions/extension_toolbar_model.h
@@ -181,6 +181,13 @@ class ExtensionToolbarModel : public content::NotificationObserver,
// Save the model to prefs.
void UpdatePrefs();
+ // Updates |extension|'s browser action visibility pref if the browser action
+ // is in the overflow menu and should be considered hidden.
+ void MaybeUpdateVisibilityPref(const Extension* extension, int index);
+
+ // Calls MaybeUpdateVisibilityPref() for each extension in |toolbar_items|.
+ void MaybeUpdateVisibilityPrefs();
+
// Finds the last known visible position of the icon for an |extension|. The
// value returned is a zero-based index into the vector of visible items.
size_t FindNewPositionFromLastKnownGood(const Extension* extension);

Powered by Google App Engine
This is Rietveld 408576698