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

Side by Side 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, 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "app/menus/button_menu_item_model.h" 5 #include "app/menus/button_menu_item_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 8
9 namespace menus { 9 namespace menus {
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 bool ButtonMenuItemModel::PartOfGroup(int index) const { 96 bool ButtonMenuItemModel::PartOfGroup(int index) const {
97 return items_[index].part_of_group; 97 return items_[index].part_of_group;
98 } 98 }
99 99
100 void ButtonMenuItemModel::ActivatedCommand(int command_id) { 100 void ButtonMenuItemModel::ActivatedCommand(int command_id) {
101 if (delegate_) 101 if (delegate_)
102 delegate_->ExecuteCommand(command_id); 102 delegate_->ExecuteCommand(command_id);
103 } 103 }
104 104
105 bool ButtonMenuItemModel::IsEnabledAt(int index) const {
106 if (delegate_)
107 return delegate_->IsCommandIdEnabled(items_[index].command_id);
108 return true;
109 }
110
105 } // namespace menus 111 } // namespace menus
OLDNEW
« 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