| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |