summaryrefslogtreecommitdiffstats
path: root/chrome/browser/wrench_menu_model.cc
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-27 19:46:04 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-27 19:46:04 +0000
commit108011938035924b2ff64fd76abb9bd967f67c0f (patch)
tree2927816fbecdacd971ea18ce28c83c0132730271 /chrome/browser/wrench_menu_model.cc
parent60742f122a4dabbcd946dfd7c1dc214366075df7 (diff)
downloadchromium_src-108011938035924b2ff64fd76abb9bd967f67c0f.zip
chromium_src-108011938035924b2ff64fd76abb9bd967f67c0f.tar.gz
chromium_src-108011938035924b2ff64fd76abb9bd967f67c0f.tar.bz2
Exposed an IsEnabledAt for ButtonMenuItemModel (this is not used yet, will be used in a subsequent checkin). The Mac wrench menu zoom controls honor the global enabled state of the zoom commands.
BUG=None. TEST=Open a PDF using the internal PDF viewer on the Mac. The Zoom controls on the Wrench menu should be disabled. Review URL: http://codereview.chromium.org/3026025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53824 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/wrench_menu_model.cc')
-rw-r--r--chrome/browser/wrench_menu_model.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/wrench_menu_model.cc b/chrome/browser/wrench_menu_model.cc
index c48b973..27d8e09 100644
--- a/chrome/browser/wrench_menu_model.cc
+++ b/chrome/browser/wrench_menu_model.cc
@@ -396,3 +396,9 @@ bool WrenchMenuModel::IsDynamicItem(int index) const {
return command_id == IDC_SYNC_BOOKMARKS ||
command_id == IDC_ABOUT;
}
+
+bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const {
+ if (delegate_)
+ return delegate_->IsCommandIdEnabled(command_id);
+ return true;
+}