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

Unified Diff: app/menus/button_menu_item_model.cc

Issue 3026025: The Mac wrench menu zoom controls honor the global enabled state of the zoom commands. (Closed)
Patch Set: Removed unneeded disabling of percentage display. Created 10 years, 5 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
« no previous file with comments | « app/menus/button_menu_item_model.h ('k') | chrome/browser/cocoa/wrench_menu_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/menus/button_menu_item_model.cc
diff --git a/app/menus/button_menu_item_model.cc b/app/menus/button_menu_item_model.cc
index c1c7f7ab5a59802242337d152d786d54909495b2..94949e4f9d023b84ea6ee420ec2b10d54870fce3 100644
--- a/app/menus/button_menu_item_model.cc
+++ b/app/menus/button_menu_item_model.cc
@@ -102,4 +102,10 @@ void ButtonMenuItemModel::ActivatedCommand(int command_id) {
delegate_->ExecuteCommand(command_id);
}
+bool ButtonMenuItemModel::IsEnabledAt(int index) const {
+ if (delegate_)
+ return delegate_->IsCommandIdEnabled(items_[index].command_id);
+ return true;
+}
+
} // namespace menus
« no previous file with comments | « app/menus/button_menu_item_model.h ('k') | chrome/browser/cocoa/wrench_menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698