summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/browser_actions_container.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 04:55:57 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 04:55:57 +0000
commite578e76354f5838edb54dc1d9457561030002123 (patch)
treec13ba5657921756bed0a167aa56edbec68730823 /chrome/browser/views/browser_actions_container.h
parent7d767625372cad11adca0789531753bd56e40e0e (diff)
downloadchromium_src-e578e76354f5838edb54dc1d9457561030002123.zip
chromium_src-e578e76354f5838edb54dc1d9457561030002123.tar.gz
chromium_src-e578e76354f5838edb54dc1d9457561030002123.tar.bz2
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
Diffstat (limited to 'chrome/browser/views/browser_actions_container.h')
-rw-r--r--chrome/browser/views/browser_actions_container.h10
1 files changed, 10 insertions, 0 deletions
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<BrowserActionView*> 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<BrowserActionOverflowMenuController> overflow_menu_;
+
// The animation that happens when the container snaps to place.
scoped_ptr<SlideAnimation> resize_animation_;