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

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

Issue 2190773002: Fix Volume slider is captured in screenshot done in touchview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 4 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/common/system/tray/system_tray.h ('k') | ash/common/system/tray/system_tray_item.h » ('j') | 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 979e3a197bf51a66dbd25c7795bd57f0adfe2872..75a6b093c7e8bcad0b1bfa15c65578d7ce865ab2 100644
--- a/ash/common/system/tray/system_tray.cc
+++ b/ash/common/system/tray/system_tray.cc
@@ -42,6 +42,7 @@
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
+#include "ui/views/widget/widget.h"
#if defined(OS_CHROMEOS)
#include "ash/common/system/chromeos/audio/tray_audio_chromeos.h"
@@ -129,6 +130,7 @@ SystemTray::SystemTray(WmShelf* wm_shelf)
hide_notifications_(false),
full_system_tray_menu_(false),
tray_accessibility_(nullptr),
+ tray_audio_(nullptr),
tray_cast_(nullptr),
tray_date_(nullptr),
tray_update_(nullptr),
@@ -206,7 +208,8 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
screen_share_tray_item_ = new ScreenShareTrayItem(this);
AddTrayItem(screen_share_tray_item_);
AddTrayItem(new MultiProfileMediaTrayItem(this));
- AddTrayItem(new TrayAudioChromeOs(this));
+ tray_audio_ = new TrayAudioChromeOs(this);
+ AddTrayItem(tray_audio_);
AddTrayItem(new TrayBrightness(this));
AddTrayItem(new TrayCapsLock(this));
// TODO(jamescook): Remove this when mus has support for display management
@@ -277,9 +280,21 @@ void SystemTray::SetDetailedViewCloseDelay(int close_delay) {
system_bubble_->bubble()->StartAutoCloseTimer(close_delay);
}
-void SystemTray::HideDetailedView(SystemTrayItem* item) {
+void SystemTray::HideDetailedView(SystemTrayItem* item, bool animate) {
if (item != detailed_item_)
return;
+
+ if (!animate) {
+ // In unittest, GetSystemBubble might return nullptr.
+ if (GetSystemBubble()) {
+ GetSystemBubble()
+ ->bubble_view()
+ ->GetWidget()
+ ->SetVisibilityAnimationTransition(
+ views::Widget::VisibilityTransition::ANIMATE_NONE);
+ }
+ }
+
DestroySystemBubble();
UpdateNotificationBubble();
}
@@ -372,6 +387,10 @@ views::View* SystemTray::GetHelpButtonView() const {
return tray_date_->GetHelpButtonView();
}
+TrayAudio* SystemTray::GetTrayAudio() const {
+ return tray_audio_;
+}
+
bool SystemTray::CloseNotificationBubbleForTest() const {
if (!notification_bubble_)
return false;
« no previous file with comments | « ash/common/system/tray/system_tray.h ('k') | ash/common/system/tray/system_tray_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698