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

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: 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/root_window_controller.h ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 30e3ba71060f95708ebd4e41995dc81fe59a420b..5064e8d2b2e73565bcbde36b32afecd24517e707 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -412,8 +412,8 @@ SystemTray* RootWindowController::GetSystemTray() {
return shelf_->status_area_widget()->system_tray();
}
-void RootWindowController::ShowContextMenu(
- const gfx::Point& location_in_screen) {
+void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen,
+ ui::MenuSourceType source_type) {
DCHECK(Shell::GetInstance()->delegate());
scoped_ptr<ui::MenuModel> menu_model(
Shell::GetInstance()->delegate()->CreateContextMenu(root_window()));
@@ -430,7 +430,8 @@ void RootWindowController::ShowContextMenu(
views::MenuRunner menu_runner(menu_model.get());
if (menu_runner.RunMenuAt(background->widget(),
NULL, gfx::Rect(location_in_screen, gfx::Size()),
- views::MenuItemView::TOPLEFT, views::MenuRunner::CONTEXT_MENU) ==
+ views::MenuItemView::TOPLEFT, 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698