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

Unified Diff: ui/base/models/simple_menu_model.cc

Issue 6893046: added CTRL+Click and SHIFT+Click handler for context menu, Back and Forward. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed some mistakes again Created 9 years, 8 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
« ui/base/models/simple_menu_model.h ('K') | « ui/base/models/simple_menu_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« ui/base/models/simple_menu_model.h ('K') | « ui/base/models/simple_menu_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698