From bdb7ff6f3d14ea2c252f1946ea200326acc047e9 Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Tue, 20 Jul 2010 01:56:52 +0000 Subject: Remove the page and app menus. BUG=none TEST=none Review URL: http://codereview.chromium.org/3033007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52985 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/wrench_menu_model.h | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) (limited to 'chrome/browser/wrench_menu_model.h') diff --git a/chrome/browser/wrench_menu_model.h b/chrome/browser/wrench_menu_model.h index 473888d..161e2c0 100644 --- a/chrome/browser/wrench_menu_model.h +++ b/chrome/browser/wrench_menu_model.h @@ -17,7 +17,6 @@ #include "chrome/common/notification_registrar.h" class Browser; -class EncodingMenuModel; namespace menus { class ButtonMenuItemModel; @@ -27,6 +26,40 @@ namespace { class MockWrenchMenuModel; } // namespace +// A menu model that builds the contents of an encoding menu. +class EncodingMenuModel : public menus::SimpleMenuModel, + public menus::SimpleMenuModel::Delegate { + public: + explicit EncodingMenuModel(Browser* browser); + virtual ~EncodingMenuModel() {} + + // Overridden from menus::SimpleMenuModel::Delegate: + virtual bool IsCommandIdChecked(int command_id) const; + virtual bool IsCommandIdEnabled(int command_id) const; + virtual bool GetAcceleratorForCommandId(int command_id, + menus::Accelerator* accelerator); + virtual void ExecuteCommand(int command_id); + + private: + void Build(); + + Browser* browser_; // weak + + DISALLOW_COPY_AND_ASSIGN(EncodingMenuModel); +}; + +// A menu model that builds the contents of the zoom menu. +class ZoomMenuModel : public menus::SimpleMenuModel { + public: + explicit ZoomMenuModel(menus::SimpleMenuModel::Delegate* delegate); + virtual ~ZoomMenuModel() {} + + private: + void Build(); + + DISALLOW_COPY_AND_ASSIGN(ZoomMenuModel); +}; + class ToolsMenuModel : public menus::SimpleMenuModel { public: ToolsMenuModel(menus::SimpleMenuModel::Delegate* delegate, Browser* browser); @@ -50,9 +83,6 @@ class WrenchMenuModel : public menus::SimpleMenuModel, Browser* browser); virtual ~WrenchMenuModel(); - // Returns true if the WrenchMenuModel is enabled. - static bool IsEnabled(); - // Overridden from menus::SimpleMenuModel: virtual bool IsLabelDynamicAt(int index) const; virtual string16 GetLabelAt(int index) const; -- cgit v1.1