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

Unified Diff: ash/system/web_notification/web_notification_tray.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: ash/system/web_notification/web_notification_tray.cc
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc
index c428bead4606cbca34d4e27239eb13e45a09e276..9579442c81ced9dd5d7f16161554eede6ffd7a46 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -302,7 +302,7 @@ bool WebNotificationTray::ShouldShowMessageCenter() {
status_area_widget()->system_tray()->HasNotificationBubble());
}
-void WebNotificationTray::ShowQuietModeMenu() {
+void WebNotificationTray::ShowQuietModeMenu(const ui::Event& event) {
base::AutoReset<bool> reset(&should_block_shelf_auto_hide_, true);
scoped_ptr<ui::MenuModel> menu_model(
message_center_tray_->CreateQuietModeMenu());
@@ -314,6 +314,7 @@ void WebNotificationTray::ShowQuietModeMenu() {
NULL,
gfx::Rect(point, bounds().size()),
views::MenuItemView::BUBBLE_ABOVE,
+ ui::GetMenuSourceTypeForEvent(event),
views::MenuRunner::HAS_MNEMONICS) == views::MenuRunner::MENU_DELETED)
return;
@@ -410,7 +411,7 @@ void WebNotificationTray::HideBubbleWithView(
bool WebNotificationTray::PerformAction(const ui::Event& event) {
if (ShouldShowQuietModeMenu(event)) {
- ShowQuietModeMenu();
+ ShowQuietModeMenu(event);
return true;
}
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | chrome/browser/chromeos/login/language_switch_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698