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

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: Update comment. 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 6f6892a3a9c5708e4e8bd6d62f1f229f81e02d01..aa9708e48cd2f4bbfb6d5c28d8a6efa3c8bb421b 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
@@ -344,6 +330,7 @@ void SystemTray::ShowDetailedView(SystemTrayItem* item,
int close_delay,
bool activate,
BubbleCreationType creation_type) {
+ detailed_view_with_close_delay_ = close_delay > 0 ? true : false;
tdanderson 2017/04/18 17:59:14 I think you can just say = close_delay > 0 here in
minch1 2017/04/18 18:29:34 I think the ternary here is necessary. Since every
tdanderson 2017/04/19 16:10:40 I agree that you should be updating |detailed_view
std::vector<SystemTrayItem*> items;
// The detailed view with timeout means a UI to show the current system state,
// like the audio level or brightness. Such UI should behave as persistent and
@@ -698,9 +685,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) &&
+ !detailed_view_with_close_delay_)) {
tdanderson 2017/04/18 17:59:14 With this change, if you: * Open the system menu
minch1 2017/04/18 18:29:34 I tried this in my device. The system menu will be
tdanderson 2017/04/19 16:10:40 You're right, I was reading this incorrectly. What
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