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

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

Issue 549151: re-try r37025 with fix for incognito mode... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/views/browser_actions_container.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/browser_actions_container.h
===================================================================
--- chrome/browser/views/browser_actions_container.h (revision 37026)
+++ chrome/browser/views/browser_actions_container.h (working copy)
@@ -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"
@@ -215,7 +216,8 @@
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();
@@ -295,14 +297,10 @@
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);
+ // ExtensionToolbarModel::Observer implementation.
+ virtual void BrowserActionAdded(Extension* extension, int index);
+ virtual void BrowserActionRemoved(Extension* extension);
- // Removes the browser action view for an extension if it has one. DCHECK if
- // no such view.
- void RemoveBrowserAction(Extension* extension);
-
// 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.
@@ -338,6 +336,9 @@
// 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_;
« no previous file with comments | « no previous file | chrome/browser/views/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698