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

Unified Diff: ash/root_window_controller.cc

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 78cf2083a8add176a742d2ca3e8b6b074e75f291..61a90e3aa09d6331e00afb5624e7fb5a198c977f 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -414,7 +414,8 @@ SystemTray* RootWindowController::GetSystemTray() {
}
void RootWindowController::ShowContextMenu(
- const gfx::Point& location_in_screen) {
+ const gfx::Point& location_in_screen,
+ ui::ContextMenuSourceType source_type) {
DCHECK(Shell::GetInstance()->delegate());
scoped_ptr<ui::MenuModel> menu_model(
Shell::GetInstance()->delegate()->CreateContextMenu(root_window()));
@@ -429,9 +430,9 @@ void RootWindowController::ShowContextMenu(
return;
views::MenuRunner menu_runner(menu_model.get());
- if (menu_runner.RunMenuAt(background->widget(),
+ if (menu_runner.RunContextMenuAt(background->widget(),
NULL, gfx::Rect(location_in_screen, gfx::Size()),
- views::MenuItemView::TOPLEFT, views::MenuRunner::CONTEXT_MENU) ==
+ source_type, views::MenuRunner::CONTEXT_MENU) ==
views::MenuRunner::MENU_DELETED) {
return;
}
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell.h » ('j') | ui/base/ui_base_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698