OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_transform_overview_window.h" | 5 #include "ash/wm/overview/scoped_transform_overview_window.h" |
6 | 6 |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/overview/scoped_window_copy.h" | 9 #include "ash/wm/overview/scoped_window_copy.h" |
10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // The animation settings used for window selector animations. | 24 // The animation settings used for window selector animations. |
25 class WindowSelectorAnimationSettings | 25 class WindowSelectorAnimationSettings |
26 : public ui::ScopedLayerAnimationSettings { | 26 : public ui::ScopedLayerAnimationSettings { |
27 public: | 27 public: |
28 WindowSelectorAnimationSettings(aura::Window* window) : | 28 WindowSelectorAnimationSettings(aura::Window* window) : |
29 ui::ScopedLayerAnimationSettings(window->layer()->GetAnimator()) { | 29 ui::ScopedLayerAnimationSettings(window->layer()->GetAnimator()) { |
30 SetPreemptionStrategy( | 30 SetPreemptionStrategy( |
31 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 31 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
32 SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 32 SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
33 ScopedTransformOverviewWindow::kTransitionMilliseconds)); | 33 ScopedTransformOverviewWindow::kTransitionMilliseconds)); |
34 SetTweenType(gfx::Tween::EASE_OUT); | 34 SetTweenType(gfx::Tween::EASE_OUT_BEZIER); |
35 } | 35 } |
36 | 36 |
37 virtual ~WindowSelectorAnimationSettings() { | 37 virtual ~WindowSelectorAnimationSettings() { |
38 } | 38 } |
39 }; | 39 }; |
40 | 40 |
41 void SetTransformOnWindow(aura::Window* window, | 41 void SetTransformOnWindow(aura::Window* window, |
42 const gfx::Transform& transform, | 42 const gfx::Transform& transform, |
43 bool animate) { | 43 bool animate) { |
44 if (animate) { | 44 if (animate) { |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } | 260 } |
261 | 261 |
262 void ScopedTransformOverviewWindow::PrepareForOverview() { | 262 void ScopedTransformOverviewWindow::PrepareForOverview() { |
263 DCHECK(!overview_started_); | 263 DCHECK(!overview_started_); |
264 overview_started_ = true; | 264 overview_started_ = true; |
265 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true); | 265 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true); |
266 RestoreWindow(); | 266 RestoreWindow(); |
267 } | 267 } |
268 | 268 |
269 } // namespace ash | 269 } // namespace ash |
OLD | NEW |