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

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

Issue 2867933002: Fix activation issues with SystemTrayBubble. (Closed)
Patch Set: Created 3 years, 7 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/system/network/network_state_list_detailed_view.cc ('k') | no next file » | no next file with comments »
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 cc76d1068097efec0d4d5068776e8af061cd296a..848efbfdfbd7d5bd61de9e0944a29e2e227ac1cc 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -468,6 +468,10 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
GetAnchorAlignment(), kTrayMenuMinimumWidth, kTrayPopupMaxWidth);
// TODO(oshima): Change TrayBubbleView itself.
init_params.can_activate = false;
+ // The bubble is not initially activatable, but will become activatable if
+ // the user presses Tab. For behavioral consistency with the non-activatable
+ // scenario, don't close on deactivation after Tab either.
+ init_params.close_on_deactivate = false;
oshima 2017/05/09 05:12:15 it's not clear to me why this is necessary. Can yo
Evan Stade 2017/05/09 14:49:52 otherwise, you press tab, then you click the info
if (detailed) {
// This is the case where a volume control or brightness control bubble
// is created.
@@ -475,8 +479,6 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
} else {
init_params.bg_color = kHeaderBackgroundColor;
}
- if (bubble_type == SystemTrayBubble::BUBBLE_TYPE_DEFAULT)
- init_params.close_on_deactivate = !persistent;
SystemTrayBubble* bubble = new SystemTrayBubble(this, items, bubble_type);
system_bubble_.reset(new SystemBubbleWrapper(bubble));
« no previous file with comments | « ash/system/network/network_state_list_detailed_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698