OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/workspace_controller.h" | 5 #include "ash/wm/workspace_controller.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // In order for pause to work we need to stop animations. | 120 // In order for pause to work we need to stop animations. |
121 viewport_->layer()->GetAnimator()->StopAnimating(); | 121 viewport_->layer()->GetAnimator()->StopAnimating(); |
122 | 122 |
123 { | 123 { |
124 ui::ScopedLayerAnimationSettings settings( | 124 ui::ScopedLayerAnimationSettings settings( |
125 viewport_->layer()->GetAnimator()); | 125 viewport_->layer()->GetAnimator()); |
126 | 126 |
127 settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); | 127 settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); |
128 viewport_->layer()->GetAnimator()->SchedulePauseForProperties( | 128 viewport_->layer()->GetAnimator()->SchedulePauseForProperties( |
129 base::TimeDelta::FromMilliseconds(kInitialPauseTimeMS), | 129 base::TimeDelta::FromMilliseconds(kInitialPauseTimeMS), |
130 ui::LayerAnimationElement::TRANSFORM, | 130 ui::LayerAnimationElement::TRANSFORM | |
131 ui::LayerAnimationElement::OPACITY, | 131 ui::LayerAnimationElement::OPACITY | |
132 ui::LayerAnimationElement::BRIGHTNESS, | 132 ui::LayerAnimationElement::BRIGHTNESS | |
133 ui::LayerAnimationElement::VISIBILITY, | 133 ui::LayerAnimationElement::VISIBILITY); |
134 -1); | |
135 | |
136 settings.SetTweenType(gfx::Tween::EASE_OUT); | 134 settings.SetTweenType(gfx::Tween::EASE_OUT); |
137 settings.SetTransitionDuration( | 135 settings.SetTransitionDuration( |
138 base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS)); | 136 base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS)); |
139 viewport_->layer()->SetTransform(gfx::Transform()); | 137 viewport_->layer()->SetTransform(gfx::Transform()); |
140 viewport_->layer()->SetOpacity(1.0f); | 138 viewport_->layer()->SetOpacity(1.0f); |
141 } | 139 } |
142 } | 140 } |
143 | 141 |
144 } // namespace internal | 142 } // namespace internal |
145 } // namespace ash | 143 } // namespace ash |
OLD | NEW |