Chromium Code Reviews| Index: ui/base/models/simple_menu_model.cc |
| diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc |
| index 57f6ec3e736ce04d06a0a35047a3d8e278916c0e..3317bf8cda1c56b916f86a299dc3acdf2232648c 100644 |
| --- a/ui/base/models/simple_menu_model.cc |
| +++ b/ui/base/models/simple_menu_model.cc |
| @@ -52,6 +52,11 @@ void SimpleMenuModel::Delegate::MenuWillShow() { |
| void SimpleMenuModel::Delegate::MenuClosed() { |
| } |
| +void SimpleMenuModel::Delegate::ExecuteCommandWithDisposition( |
| + int command_id, int disposition) { |
| + ExecuteCommand(command_id); |
| +} |
| + |
| //////////////////////////////////////////////////////////////////////////////// |
| // SimpleMenuModel, public: |
| @@ -290,6 +295,12 @@ void SimpleMenuModel::ActivatedAt(int index) { |
| delegate_->ExecuteCommand(GetCommandIdAt(index)); |
| } |
| +void SimpleMenuModel::ActivatedAtWithDisposition(int index, int disposition) { |
| + if (delegate_) |
|
brettw
2011/05/03 19:43:53
BTW if you have >1 line in a conditional, we alway
|
| + delegate_->ExecuteCommandWithDisposition(GetCommandIdAt(index), |
| + disposition); |
| +} |
| + |
| MenuModel* SimpleMenuModel::GetSubmenuModelAt(int index) const { |
| return items_.at(FlipIndex(index)).submenu; |
| } |