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

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

Issue 2848783002: [Merge to M59]Open system menu when click the status tray with volume popup opened. (Closed)
Patch Set: Created 3 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 | « ash/system/tray/system_tray.h ('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 6f6892a3a9c5708e4e8bd6d62f1f229f81e02d01..e3d178fff51443e31adf0fb66aad88163c6b5c5b 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -209,21 +209,7 @@ class SystemTray::ActivationObserver
// SystemTray
-SystemTray::SystemTray(WmShelf* wm_shelf)
- : TrayBackgroundView(wm_shelf, true),
- web_notification_tray_(nullptr),
- detailed_item_(nullptr),
- default_bubble_height_(0),
- full_system_tray_menu_(false),
- tray_accessibility_(nullptr),
- tray_audio_(nullptr),
- tray_cast_(nullptr),
- tray_network_(nullptr),
- tray_tiles_(nullptr),
- tray_system_info_(nullptr),
- tray_update_(nullptr),
- screen_capture_tray_item_(nullptr),
- screen_share_tray_item_(nullptr) {
+SystemTray::SystemTray(WmShelf* wm_shelf) : TrayBackgroundView(wm_shelf, true) {
SetInkDropMode(InkDropMode::ON);
// Since user avatar is on the right hand side of System tray of a
@@ -698,9 +684,11 @@ void SystemTray::ActivateBubble() {
}
bool SystemTray::PerformAction(const ui::Event& event) {
- // If we're already showing the menu, hide it; otherwise, show it (and hide
- // any popup that's currently shown).
- if (HasSystemBubble()) {
+ // If we're already showing the default view or detailed view in system menu,
+ // hide it; otherwise, show it (and hide any popup that's currently shown).
+ if (HasSystemBubbleType(SystemTrayBubble::BUBBLE_TYPE_DEFAULT) ||
+ (HasSystemBubbleType(SystemTrayBubble::BUBBLE_TYPE_DETAILED) &&
+ full_system_tray_menu_)) {
system_bubble_->bubble()->Close();
} else {
ShowDefaultView(BUBBLE_CREATE_NEW);
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698