diff options
author | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-13 04:22:14 +0000 |
---|---|---|
committer | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-13 04:22:14 +0000 |
commit | 96bf34ee6a76595de996738466084a344f2f8771 (patch) | |
tree | 3e563e2f4f15298c7c3e243758f771a737c2b5eb /ui/base | |
parent | 9324bff2ee61a20d1df733d20e8d196e69fcb417 (diff) | |
download | chromium_src-96bf34ee6a76595de996738466084a344f2f8771.zip chromium_src-96bf34ee6a76595de996738466084a344f2f8771.tar.gz chromium_src-96bf34ee6a76595de996738466084a344f2f8771.tar.bz2 |
Delete items of the launcher jump list upon pressing Shift click
BUG=181541
TEST=unittest
Review URL: https://chromiumcodereview.appspot.com/12518012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187769 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r-- | ui/base/models/button_menu_item_model.cc | 2 | ||||
-rw-r--r-- | ui/base/models/button_menu_item_model.h | 2 | ||||
-rw-r--r-- | ui/base/models/simple_menu_model.cc | 4 | ||||
-rw-r--r-- | ui/base/models/simple_menu_model.h | 9 |
4 files changed, 8 insertions, 9 deletions
diff --git a/ui/base/models/button_menu_item_model.cc b/ui/base/models/button_menu_item_model.cc index 9490b9d..248ae03 100644 --- a/ui/base/models/button_menu_item_model.cc +++ b/ui/base/models/button_menu_item_model.cc @@ -108,7 +108,7 @@ bool ButtonMenuItemModel::PartOfGroup(int index) const { void ButtonMenuItemModel::ActivatedCommand(int command_id) { if (delegate_) - delegate_->ExecuteCommand(command_id); + delegate_->ExecuteCommand(command_id, 0); } bool ButtonMenuItemModel::IsEnabledAt(int index) const { diff --git a/ui/base/models/button_menu_item_model.h b/ui/base/models/button_menu_item_model.h index a9ef808..05b7d34 100644 --- a/ui/base/models/button_menu_item_model.h +++ b/ui/base/models/button_menu_item_model.h @@ -30,7 +30,7 @@ class UI_EXPORT ButtonMenuItemModel { virtual string16 GetLabelForCommandId(int command_id) const; // Performs the action associated with the specified command id. - virtual void ExecuteCommand(int command_id) = 0; + virtual void ExecuteCommand(int command_id, int event_flags) = 0; virtual bool IsCommandIdEnabled(int command_id) const; virtual bool DoesCommandIdDismissMenu(int command_id) const; diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc index dcfacd7b..4d52132 100644 --- a/ui/base/models/simple_menu_model.cc +++ b/ui/base/models/simple_menu_model.cc @@ -50,7 +50,7 @@ void SimpleMenuModel::Delegate::CommandIdHighlighted(int command_id) { void SimpleMenuModel::Delegate::ExecuteCommand( int command_id, int event_flags) { - ExecuteCommand(command_id); + ExecuteCommand(command_id, event_flags); } void SimpleMenuModel::Delegate::MenuWillShow(SimpleMenuModel* /*source*/) { @@ -323,7 +323,7 @@ void SimpleMenuModel::HighlightChangedTo(int index) { void SimpleMenuModel::ActivatedAt(int index) { if (delegate_) - delegate_->ExecuteCommand(GetCommandIdAt(index)); + delegate_->ExecuteCommand(GetCommandIdAt(index), 0); } void SimpleMenuModel::ActivatedAt(int index, int event_flags) { diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h index 06917f3..552e9b7 100644 --- a/ui/base/models/simple_menu_model.h +++ b/ui/base/models/simple_menu_model.h @@ -50,11 +50,10 @@ class UI_EXPORT SimpleMenuModel : public MenuModel { // visually highlighted within the menu. virtual void CommandIdHighlighted(int command_id); - // Performs the action associated with the specified command id. - virtual void ExecuteCommand(int command_id) = 0; - // Performs the action associates with the specified command id - // with |event_flags|. - virtual void ExecuteCommand(int command_id, int event_flags); + // Performs the action associates with the specified command id. + // The passed |event_flags| are the flags from the event which issued this + // command and they can be examined to find modifier keys. + virtual void ExecuteCommand(int command_id, int event_flags) = 0; // Notifies the delegate that the menu is about to show. virtual void MenuWillShow(SimpleMenuModel* source); |