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

Unified Diff: ash/shell/window_type_launcher.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
« no previous file with comments | « ash/shell/window_type_launcher.h ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/window_type_launcher.cc
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc
index f87250ddcaf81908d948ee2dfa2824563b1fa851..4bfe453b942741a544f15f7acc042ea6dfb5a8fc 100644
--- a/ash/shell/window_type_launcher.cc
+++ b/ash/shell/window_type_launcher.cc
@@ -388,8 +388,10 @@ void WindowTypeLauncher::ExecuteCommand(int id, int event_flags) {
#endif // !defined(OS_MACOSX)
#if !defined(OS_MACOSX)
-void WindowTypeLauncher::ShowContextMenuForView(views::View* source,
- const gfx::Point& point) {
+void WindowTypeLauncher::ShowContextMenuForView(
+ views::View* source,
+ const gfx::Point& point,
+ ui::MenuSourceType source_type) {
MenuItemView* root = new MenuItemView(this);
root->AppendMenuItem(COMMAND_NEW_WINDOW,
ASCIIToUTF16("New Window"),
@@ -399,8 +401,10 @@ void WindowTypeLauncher::ShowContextMenuForView(views::View* source,
MenuItemView::NORMAL);
// MenuRunner takes ownership of root.
menu_runner_.reset(new MenuRunner(root));
- if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
+ if (menu_runner_->RunMenuAt(GetWidget(), NULL,
+ gfx::Rect(point, gfx::Size()),
MenuItemView::TOPLEFT,
+ source_type,
MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) ==
MenuRunner::MENU_DELETED)
return;
« no previous file with comments | « ash/shell/window_type_launcher.h ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698