Chromium Code Reviews| Index: ash/system/tray/tray_background_view.cc |
| diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc |
| index a36c3ad9cc1f2616a545bfb65be3fbfd98a375a1..2a155d376cae612f2285dee81f7f7cb1b6a5f5ab 100644 |
| --- a/ash/system/tray/tray_background_view.cc |
| +++ b/ash/system/tray/tray_background_view.cc |
| @@ -264,6 +264,19 @@ void TrayBackgroundView::Initialize() { |
| SetTrayBorder(); |
| } |
| +// static |
| +void TrayBackgroundView::InitializeBubbleAnimations( |
| + views::Widget* bubble_widget) { |
| + ::wm::SetWindowVisibilityAnimationType( |
| + bubble_widget->GetNativeWindow(), |
|
msw
2016/04/28 23:57:36
optional nit: cache this
James Cook
2016/04/29 16:17:40
Done.
|
| + ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
| + ::wm::SetWindowVisibilityAnimationTransition(bubble_widget->GetNativeWindow(), |
| + ::wm::ANIMATE_HIDE); |
| + ::wm::SetWindowVisibilityAnimationDuration( |
| + bubble_widget->GetNativeWindow(), |
| + base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMs)); |
| +} |
| + |
| void TrayBackgroundView::SetVisible(bool visible) { |
| if (visible == layer()->GetTargetVisibility()) |
| return; |
| @@ -458,18 +471,6 @@ void TrayBackgroundView::HideTransformation() { |
| layer()->SetTransform(transform); |
| } |
| -void TrayBackgroundView::InitializeBubbleAnimations( |
| - views::Widget* bubble_widget) { |
| - ::wm::SetWindowVisibilityAnimationType( |
| - bubble_widget->GetNativeWindow(), |
| - ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
| - ::wm::SetWindowVisibilityAnimationTransition(bubble_widget->GetNativeWindow(), |
| - ::wm::ANIMATE_HIDE); |
| - ::wm::SetWindowVisibilityAnimationDuration( |
| - bubble_widget->GetNativeWindow(), |
| - base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMs)); |
| -} |
| - |
| aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const { |
| return ash::Shell::GetContainer( |
| tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(), |