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

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: disable hiding animation; restoring volume does not notify UI Created 4 years, 5 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
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..3d63256749a8d228e2b74016f75bbdd192f39e18 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"
@@ -277,7 +278,17 @@ void SystemTray::SetDetailedViewCloseDelay(int close_delay) {
system_bubble_->bubble()->StartAutoCloseTimer(close_delay);
}
-void SystemTray::HideDetailedView(SystemTrayItem* item) {
+void SystemTray::HideDetailedView(SystemTrayItem* item, bool hide_animation) {
+ if (!hide_animation) {
+ // In unittest, GetSystemBubble might return nullptr.
+ if (GetSystemBubble()) {
+ GetSystemBubble()
+ ->bubble_view()
+ ->GetWidget()
+ ->SetVisibilityAnimationTransition(
Daniel Erat 2016/07/28 22:20:40 does this affect future transitions, or does a new
Qiang(Joe) Xu 2016/07/28 23:15:57 Yes, systembubble is autoclosed everytime. So this
+ views::Widget::VisibilityTransition::ANIMATE_NONE);
+ }
+ }
if (item != detailed_item_)
return;
DestroySystemBubble();

Powered by Google App Engine
This is Rietveld 408576698