Chromium Code Reviews| Index: chrome/browser/ui/toolbar/action_box_menu_model.h |
| diff --git a/chrome/browser/ui/toolbar/action_box_menu_model.h b/chrome/browser/ui/toolbar/action_box_menu_model.h |
| index 8096e8701fb66b2ea7dca1a3444baece31f9524a..abb3ff3e218c3343efdd5c9981f4f8bea844404b 100644 |
| --- a/chrome/browser/ui/toolbar/action_box_menu_model.h |
| +++ b/chrome/browser/ui/toolbar/action_box_menu_model.h |
| @@ -8,11 +8,14 @@ |
| #include <map> |
| #include "content/public/browser/notification_observer.h" |
| +#include "chrome/browser/command_observer.h" |
| #include "chrome/browser/extensions/extension_service.h" |
| #include "chrome/browser/ui/browser_commands.h" |
| #include "ui/base/models/simple_menu_model.h" |
| class Browser; |
| +class CommandUpdater; |
| +class Profile; |
| namespace extensions { |
| class Extension; |
| @@ -23,10 +26,12 @@ class Extension; |
| // at creation time. |
| class ActionBoxMenuModel : public ui::SimpleMenuModel, |
| public ui::SimpleMenuModel::Delegate, |
| - public content::NotificationObserver { |
| + public content::NotificationObserver, |
| + public CommandObserver { |
| public: |
| ActionBoxMenuModel(Browser* browser, |
| - ExtensionService* extension_service); |
| + ExtensionService* extension_service, |
| + CommandUpdater* command_updater); |
| virtual ~ActionBoxMenuModel(); |
| // Returns true if item associated with an extension. |
| @@ -56,8 +61,14 @@ class ActionBoxMenuModel : public ui::SimpleMenuModel, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) OVERRIDE; |
| + // CommandObserver: |
| + virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE; |
| + |
| + void UpdateMenu(); |
|
msw
2012/08/29 22:05:42
nit: Add a comment.
Cait (Slow)
2012/08/29 23:03:47
Done.
|
| + |
| Browser* browser_; |
| ExtensionService* extension_service_; |
| + CommandUpdater* command_updater_; |
| IdToEntensionIdMap id_to_extension_id_map_; |