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

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

Issue 2784163003: Dismiss the system menu if the status area is clicked while the menu is open. (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_tray.cc
diff --git a/ash/common/system/tray/system_tray.cc b/ash/common/system/tray/system_tray.cc
index b471a79cd70638c73d35de43c0c5c0d0eba675d1..5fcc2cf14d5a75503e8c8c919bcfeb355778c03c 100644
--- a/ash/common/system/tray/system_tray.cc
+++ b/ash/common/system/tray/system_tray.cc
@@ -707,9 +707,10 @@ void SystemTray::ActivateBubble() {
}
bool SystemTray::PerformAction(const ui::Event& event) {
- // If we're already showing the default view, hide it; otherwise, show it
- // (and hide any popup that's currently shown).
- if (HasSystemBubbleType(SystemTrayBubble::BUBBLE_TYPE_DEFAULT)) {
+ // If we're already showing the menu (whatever default view or detailed view,
tdanderson 2017/03/30 19:54:57 nit: no need to mention the bug number in the comm
+ // crbug.com/690112), hide it; otherwise, show it (and hide any popup that's
+ // currently shown).
+ if (system_bubble_.get()) {
tdanderson 2017/03/30 19:54:57 nit: call HasSystemBubble() here instead
system_bubble_->bubble()->Close();
} else {
ShowDefaultView(BUBBLE_CREATE_NEW);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698