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

Unified Diff: chrome/browser/ui/views/action_box_menu.cc

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 6 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
Index: chrome/browser/ui/views/action_box_menu.cc
diff --git a/chrome/browser/ui/views/action_box_menu.cc b/chrome/browser/ui/views/action_box_menu.cc
index 8ef3d82dbfccd949c3cae9f360f7e6a8608b495c..d6a7ecdf85ea622166b66d2d4e0de1ebe45ef14f 100644
--- a/chrome/browser/ui/views/action_box_menu.cc
+++ b/chrome/browser/ui/views/action_box_menu.cc
@@ -71,6 +71,7 @@ void ActionBoxMenu::RunMenu(views::MenuButton* menu_button,
menu_button,
gfx::Rect(menu_offset, menu_button->size()),
views::MenuItemView::TOPRIGHT,
+ ui::MENU_SOURCE_NONE,
views::MenuRunner::HAS_MNEMONICS));
}
@@ -92,7 +93,7 @@ void ActionBoxMenu::ExecuteCommand(int id) {
bool ActionBoxMenu::ShowContextMenu(views::MenuItemView* source,
int id,
const gfx::Point& p,
- bool is_mouse_gesture) {
+ ui::MenuSourceType source_type) {
DCHECK(menu_parent_);
int index = model_->GetIndexOfCommandId(id);
@@ -101,7 +102,7 @@ bool ActionBoxMenu::ShowContextMenu(views::MenuItemView* source,
context_menu_.reset(
new ActionBoxContextMenu(browser_, model_->GetExtensionAt(index)));
- if (context_menu_->RunMenuAt(p, menu_parent_) ==
+ if (context_menu_->RunMenuAt(p, menu_parent_, source_type) ==
views::MenuRunner::MENU_DELETED)
return true;
context_menu_.reset();
« no previous file with comments | « chrome/browser/ui/views/action_box_menu.h ('k') | chrome/browser/ui/views/autofill/autofill_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698