summaryrefslogtreecommitdiffstats
path: root/chrome/browser/wrench_menu_model.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 01:56:52 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 01:56:52 +0000
commitbdb7ff6f3d14ea2c252f1946ea200326acc047e9 (patch)
tree793c5fb7947554416bf9342cc6c728715add31d2 /chrome/browser/wrench_menu_model.h
parentcf5804412f3a525a35a7549bb557bc20d3243499 (diff)
downloadchromium_src-bdb7ff6f3d14ea2c252f1946ea200326acc047e9.zip
chromium_src-bdb7ff6f3d14ea2c252f1946ea200326acc047e9.tar.gz
chromium_src-bdb7ff6f3d14ea2c252f1946ea200326acc047e9.tar.bz2
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
Diffstat (limited to 'chrome/browser/wrench_menu_model.h')
-rw-r--r--chrome/browser/wrench_menu_model.h38
1 files changed, 34 insertions, 4 deletions
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;