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

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: based on new cr from Daniel 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..3ff3d03f508c397906a26e4021c1219e99007642 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 animate) {
+ if (!animate) {
James Cook 2016/08/01 16:51:46 nit: Could this happen after line 292 below? I'm n
Qiang(Joe) Xu 2016/08/01 20:28:09 mmm... not sure, but safer to move below 293. Than
+ // In unittest, GetSystemBubble might return nullptr.
+ if (GetSystemBubble()) {
+ GetSystemBubble()
+ ->bubble_view()
+ ->GetWidget()
+ ->SetVisibilityAnimationTransition(
+ views::Widget::VisibilityTransition::ANIMATE_NONE);
+ }
+ }
if (item != detailed_item_)
return;
DestroySystemBubble();

Powered by Google App Engine
This is Rietveld 408576698