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

Unified Diff: ash/system/tray/system_tray.cc

Issue 1876553002: mash: Close system tray bubble on click outside its bounds, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 8 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 | « no previous file | ui/views/bubble/tray_bubble_view.h » ('j') | ui/views/bubble/tray_bubble_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 211570870c7057dd021b1e584d8692b7a91c53c7..e48cd1feb5f3c207a3ebf975db1aecf2f4789edf 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -500,6 +500,8 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
menu_width,
kTrayPopupMaxWidth);
init_params.can_activate = can_activate;
+ // Mus cannot use EventHandlers to close the tray, so it uses capture.
+ init_params.close_via_capture = Shell::GetInstance()->in_mus();
init_params.first_item_has_no_margin = true;
if (detailed) {
// This is the case where a volume control or brightness control bubble
@@ -572,6 +574,8 @@ void SystemTray::UpdateNotificationBubble() {
GetAnchorAlignment(),
kTrayPopupMinWidth,
kTrayPopupMaxWidth);
+ // Mus cannot use EventHandlers to close the tray, so it uses capture.
+ init_params.close_via_capture = Shell::GetInstance()->in_mus();
init_params.first_item_has_no_margin = true;
init_params.arrow_color = kBackgroundColor;
init_params.arrow_offset = GetTrayXOffset(notification_items_[0]);
« no previous file with comments | « no previous file | ui/views/bubble/tray_bubble_view.h » ('j') | ui/views/bubble/tray_bubble_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698