From e578e76354f5838edb54dc1d9457561030002123 Mon Sep 17 00:00:00 2001 From: "finnur@chromium.org" Date: Wed, 27 Jan 2010 04:55:57 +0000 Subject: Add overflow menu to the browser action container (part 2 of supporting resize for the container). Also improved RTL support a bit (the divider wasn't drawn on the right side of the container and resizing was reversed). BUG=32101 TEST=Overflow menu for browser action container should now work. Make sure to test also right-clicking on a menu item in the overflow menu to bring up a context menu for that item. And resizing the container in RTL locales should work. Review URL: http://codereview.chromium.org/557006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37232 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/browser_actions_container.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'chrome/browser/views/browser_actions_container.h') diff --git a/chrome/browser/views/browser_actions_container.h b/chrome/browser/views/browser_actions_container.h index d2b87a4..c668965 100644 --- a/chrome/browser/views/browser_actions_container.h +++ b/chrome/browser/views/browser_actions_container.h @@ -19,6 +19,7 @@ #include "views/view.h" class BrowserActionsContainer; +class BrowserActionOverflowMenuController; class Extension; class ExtensionAction; class ExtensionPopup; @@ -303,6 +304,9 @@ class BrowserActionsContainer // no such view. void RemoveBrowserAction(Extension* extension); + // Closes the overflow menu if open. + void CloseOverflowMenu(); + // Takes a width in pixels, calculates how many icons fit within that space // (up to the maximum number of icons in our vector) and shaves off the // excess pixels. @@ -321,6 +325,9 @@ class BrowserActionsContainer // all the padding that we normally show if there are icons. int ContainerMinSize() const; + // Returns how many browser actions are visible. + size_t VisibleBrowserActions() const; + // The vector of browser actions (icons/image buttons for each action). std::vector browser_action_views_; @@ -347,6 +354,9 @@ class BrowserActionsContainer // The chevron for accessing the overflow items. views::MenuButton* chevron_; + // The menu to show for the overflow button (chevron). + scoped_ptr overflow_menu_; + // The animation that happens when the container snaps to place. scoped_ptr resize_animation_; -- cgit v1.1