OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/overview/scoped_overview_animation_settings.h" | 5 #include "ash/wm/overview/scoped_overview_animation_settings.h" |
6 | 6 |
7 #include "ash/wm/overview/overview_animation_type.h" | 7 #include "ash/wm/overview/overview_animation_type.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/compositor/layer.h" | 10 #include "ui/compositor/layer.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 66 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
67 break; | 67 break; |
68 } | 68 } |
69 animation_settings_.SetTransitionDuration( | 69 animation_settings_.SetTransitionDuration( |
70 GetAnimationDuration(animation_type)); | 70 GetAnimationDuration(animation_type)); |
71 } | 71 } |
72 | 72 |
73 ScopedOverviewAnimationSettings::~ScopedOverviewAnimationSettings() { | 73 ScopedOverviewAnimationSettings::~ScopedOverviewAnimationSettings() { |
74 } | 74 } |
75 | 75 |
| 76 // static: |
| 77 void ScopedOverviewAnimationSettings::SetupFadeInAfterLayout( |
| 78 aura::Window* window) { |
| 79 ui::Layer* layer = window->layer(); |
| 80 layer->SetOpacity(0.0f); |
| 81 ScopedOverviewAnimationSettings animation_settings( |
| 82 OverviewAnimationType::OVERVIEW_ANIMATION_ENTER_OVERVIEW_MODE_FADE_IN, |
| 83 window); |
| 84 layer->SetOpacity(1.0f); |
| 85 } |
| 86 |
76 } // namespace ash | 87 } // namespace ash |
OLD | NEW |