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

Unified Diff: chrome/browser/ui/toolbar/action_box_menu_model.h

Issue 10823289: Adding "send to mobile" and "add bookmark" to the action box menu and wiring to their respective ac… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applied review comments. Created 8 years, 4 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
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 1f7de61e08494923a7eb27fa553d12d8aca99635..eaa751d917e3f431d63f376a7abd84433ffb8764 100644
--- a/chrome/browser/ui/toolbar/action_box_menu_model.h
+++ b/chrome/browser/ui/toolbar/action_box_menu_model.h
@@ -9,17 +9,21 @@
#include "content/public/browser/notification_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;
+
namespace extensions {
class Extension;
}
// A menu model that builds the contents of the action box menu.
class ActionBoxMenuModel : public ui::SimpleMenuModel,
+ public ui::SimpleMenuModel::Delegate,
public content::NotificationObserver {
public:
- explicit ActionBoxMenuModel(ExtensionService* extension_service);
+ ActionBoxMenuModel(Browser* browser, ExtensionService* extension_service);
virtual ~ActionBoxMenuModel();
const extensions::ExtensionList& action_box_menu_items() {
@@ -29,11 +33,20 @@ class ActionBoxMenuModel : public ui::SimpleMenuModel,
private:
typedef std::map<int, std::string> IdToEntensionIdMap;
+ // Overridden from ui::SimpleMenuModel::Delegate:
+ virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool GetAcceleratorForCommandId(
+ int command_id,
+ ui::Accelerator* accelerator) OVERRIDE;
+ virtual void ExecuteCommand(int command_id) OVERRIDE;
+
// Overridden from content::NotificationObserver:
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ Browser* browser_;
ExtensionService* extension_service_;
IdToEntensionIdMap id_to_extension_id_map_;
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/plus_decoration.mm ('k') | chrome/browser/ui/toolbar/action_box_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698