Chromium Code Reviews| Index: chrome/browser/ui/views/toolbar/browser_action_view.h |
| diff --git a/chrome/browser/ui/views/toolbar/browser_action_view.h b/chrome/browser/ui/views/toolbar/browser_action_view.h |
| index 7d8991964e172bb160ed14f9246e6dfbba420f01..f168f0a40ee7e2fbd127086343c1cda3d98be89d 100644 |
| --- a/chrome/browser/ui/views/toolbar/browser_action_view.h |
| +++ b/chrome/browser/ui/views/toolbar/browser_action_view.h |
| @@ -111,6 +111,18 @@ class BrowserActionButton : public views::MenuButton, |
| public content::NotificationObserver, |
| public ExtensionActionIconFactory::Observer { |
| public: |
| + // The IconObserver will receive a notification when the button's icon has |
| + // been updated. |
| + class IconObserver { |
| + public: |
| + virtual ~IconObserver() {} |
| + virtual void OnIconUpdated(const gfx::ImageSkia& icon) = 0; |
| + }; |
| + |
| + void set_icon_observer(IconObserver* icon_observer) { |
| + icon_observer_ = icon_observer; |
| + } |
| + |
| BrowserActionButton(const extensions::Extension* extension, |
| Browser* browser_, |
| BrowserActionView::Delegate* delegate); |
| @@ -230,6 +242,8 @@ class BrowserActionButton : public views::MenuButton, |
| // Responsible for running the menu. |
| scoped_ptr<views::MenuRunner> menu_runner_; |
| + IconObserver* icon_observer_; |
|
Finnur
2014/02/10 10:41:41
nit: Document.
|
| + |
| friend class base::DeleteHelper<BrowserActionButton>; |
| DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); |