summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/browser_actions_container.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 20:40:44 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 20:40:44 +0000
commit6c852a8a8057ad5bce0d546c4c86a723f33c49b3 (patch)
tree7dd330780c1583d4f726d1cb054244114719004b /chrome/browser/views/browser_actions_container.h
parent5de6f449ec1eb0e218004949d13ae3202587b3e3 (diff)
downloadchromium_src-6c852a8a8057ad5bce0d546c4c86a723f33c49b3.zip
chromium_src-6c852a8a8057ad5bce0d546c4c86a723f33c49b3.tar.gz
chromium_src-6c852a8a8057ad5bce0d546c4c86a723f33c49b3.tar.bz2
re-try r37061 with fix for browser tests
---------------------------------------- Views: use ExtensionToolbarModel for ordering of browser action buttons. This doesn't implement drag and drop reording, but the order is stored on shutdown and restored on startup. BUG=26990 Review URL: http://codereview.chromium.org/553084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/browser_actions_container.h')
-rw-r--r--chrome/browser/views/browser_actions_container.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/views/browser_actions_container.h b/chrome/browser/views/browser_actions_container.h
index 3f769b7..9adb6e7 100644
--- a/chrome/browser/views/browser_actions_container.h
+++ b/chrome/browser/views/browser_actions_container.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/task.h"
+#include "chrome/browser/extensions/extension_toolbar_model.h"
#include "chrome/browser/extensions/image_loading_tracker.h"
#include "chrome/browser/views/browser_bubble.h"
#include "chrome/browser/views/extensions/extension_action_context_menu.h"
@@ -217,7 +218,8 @@ class BrowserActionsContainer
public BrowserBubble::Delegate,
public views::ViewMenuDelegate,
public views::ResizeGripper::ResizeGripperDelegate,
- public AnimationDelegate {
+ public AnimationDelegate,
+ public ExtensionToolbarModel::Observer {
public:
BrowserActionsContainer(Profile* profile, ToolbarView* toolbar);
virtual ~BrowserActionsContainer();
@@ -297,13 +299,9 @@ class BrowserActionsContainer
ExtensionPopup* TestGetPopup() { return popup_; }
private:
- // Adds a browser action view for the extension if it needs one. DCHECK if
- // it has already been added.
- void AddBrowserAction(Extension* extension);
-
- // Removes the browser action view for an extension if it has one. DCHECK if
- // no such view.
- void RemoveBrowserAction(Extension* extension);
+ // ExtensionToolbarModel::Observer implementation.
+ virtual void BrowserActionAdded(Extension* extension, int index);
+ virtual void BrowserActionRemoved(Extension* extension);
// Closes the overflow menu if open.
void CloseOverflowMenu();
@@ -346,6 +344,9 @@ class BrowserActionsContainer
// from browser_action_views_).
BrowserActionButton* popup_button_;
+ // The model that tracks the order of the toolbar icons.
+ ExtensionToolbarModel* model_;
+
// The current size of the container.
gfx::Size container_size_;