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

Unified Diff: chrome/browser/ui/views/toolbar/browser_actions_container.h

Issue 675023002: Make extensions that desire to act pop out if in overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fixes Created 6 years, 2 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 98d2464e356334348ece318151dc27b1f8e6fb64..d42fb06b781aefe478367cbfe36150c04096542e 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.h
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.h
@@ -235,7 +235,7 @@ class BrowserActionsContainer
virtual void AnimationEnded(const gfx::Animation* animation) override;
// Overridden from BrowserActionView::Delegate:
- virtual content::WebContents* GetCurrentWebContents() override;
+ virtual content::WebContents* GetCurrentWebContents() const override;
virtual bool ShownInsideMenu() const override;
virtual void OnBrowserActionViewDragDone() override;
virtual views::MenuButton* GetOverflowReferenceView() override;
@@ -289,6 +289,8 @@ class BrowserActionsContainer
bool grant_active_tab) override;
virtual void ToolbarVisibleCountChanged() override;
virtual void ToolbarHighlightModeChanged(bool is_highlighting) override;
+ virtual void ToolbarReorderNecessary(content::WebContents* web_contents)
+ override;
virtual Browser* GetBrowser() override;
void LoadImages();
@@ -327,6 +329,9 @@ class BrowserActionsContainer
// the target size).
void Animate(gfx::Tween::Type type, size_t num_visible_icons);
+ // Reorder the views to match the toolbar model for the active tab.
+ void ReorderViews();
+
// 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;
@@ -379,6 +384,13 @@ class BrowserActionsContainer
// Don't show the chevron while animating.
bool suppress_chevron_;
+ // True if we should suppress animation.
+ bool suppress_animation_;
+
+ // True if we should suppress layout, such as when we are creating or
+ // adjusting a lot of views.
+ bool suppress_layout_;
+
// This is used while the user is resizing (and when the animations are in
// progress) to know how wide the delta is between the current state and what
// we should draw.

Powered by Google App Engine
This is Rietveld 408576698