Chromium Code Reviews| 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(); |