| 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) {
|
| + // In unittest, GetSystemBubble might return nullptr.
|
| + if (GetSystemBubble()) {
|
| + GetSystemBubble()
|
| + ->bubble_view()
|
| + ->GetWidget()
|
| + ->SetVisibilityAnimationTransition(
|
| + views::Widget::VisibilityTransition::ANIMATE_NONE);
|
| + }
|
| + }
|
| if (item != detailed_item_)
|
| return;
|
| DestroySystemBubble();
|
|
|