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

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

Issue 2818183002: Open system menu when click the status tray with volume popup opend (Closed)
Patch Set: Address comments. 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
« ash/system/tray/system_tray.h ('K') | « 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 d6a15e80d1b2434a5e7e751221142952c1f12745..5139ec058af55304bc45dff348f1560e27ab7b2b 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -207,21 +207,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
@@ -696,9 +682,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);
« ash/system/tray/system_tray.h ('K') | « ash/system/tray/system_tray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698