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

Unified Diff: chrome/browser/gtk/browser_actions_toolbar_gtk.h

Issue 462026: Extensions: create a simple model for the browser action buttons toolstrip an... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/browser/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_actions_toolbar_gtk.h
===================================================================
--- chrome/browser/gtk/browser_actions_toolbar_gtk.h (revision 33989)
+++ chrome/browser/gtk/browser_actions_toolbar_gtk.h (working copy)
@@ -9,6 +9,7 @@
#include <string>
#include "base/linked_ptr.h"
+#include "chrome/browser/extensions/extension_toolbar_model.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/owned_widget_gtk.h"
@@ -20,7 +21,7 @@
typedef struct _GtkWidget GtkWidget;
-class BrowserActionsToolbarGtk : public NotificationObserver {
+class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer {
public:
explicit BrowserActionsToolbarGtk(Browser* browser);
~BrowserActionsToolbarGtk();
@@ -37,11 +38,6 @@
// Update the display of all buttons.
void Update();
- // NotificationObserver implementation.
- void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
-
private:
// Query the extensions service for all extensions with browser actions,
// and create the UI for them.
@@ -60,14 +56,18 @@
// to show.
void UpdateVisibility();
+ // ExtensionToolbarModel::Observer implementation.
+ virtual void ExtensionAdded(Extension* extension, int index);
+ virtual void ExtensionRemoved(Extension* extension);
+
Browser* browser_;
Profile* profile_;
+ ExtensionToolbarModel* model_;
+
OwnedWidgetGtk hbox_;
- NotificationRegistrar registrar_;
-
// Map from extension ID to BrowserActionButton, which is a wrapper for
// a chrome button and related functionality. There should be one entry
// for every extension that has a browser action.
« no previous file with comments | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/browser/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698