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

Unified Diff: chrome/browser/ui/views/toolbar/browser_actions_container.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/ui/views/toolbar/browser_actions_container.h
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.h b/chrome/browser/ui/views/toolbar/browser_actions_container.h
index fabf02f104e8ed2c16fec046cb4cc66b3f87c73b..99c2cada291d3c56222d6877874bceb6599830d4 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.h
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.h
@@ -339,15 +339,13 @@ class BrowserActionsContainer
int MinimumNonemptyWidth() const;
// Animate to the target size (unless testing, in which case we go straight to
- // the target size). This also saves the target number of visible icons in
- // the pref if we're not incognito.
- void SaveDesiredSizeAndAnimate(gfx::Tween::Type type,
- size_t num_visible_icons);
+ // the target size).
+ void Animate(gfx::Tween::Type type, size_t num_visible_icons);
// Returns true if this extension should be shown in this toolbar. This can
// return false if we are in an incognito window and the extension is disabled
// for incognito.
- bool ShouldDisplayBrowserAction(const extensions::Extension* extension);
+ bool ShouldDisplayBrowserAction(const extensions::Extension* extension) const;
// Return the index of the first visible icon.
size_t GetFirstVisibleIconIndex() const;
@@ -357,6 +355,10 @@ class BrowserActionsContainer
BrowserActionView* GetViewForExtension(
const extensions::Extension* extension);
+ // Returns the number of icons that this container should draw. This differs
+ // from the model's GetVisibleIconCount if this container is for the overflow.
+ size_t GetIconCount() const;
+
// Whether this container is in overflow mode (as opposed to in 'main'
// mode). See class comments for details on the difference.
bool in_overflow_mode() const { return main_container_ != NULL; }

Powered by Google App Engine
This is Rietveld 408576698