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_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/overview/scoped_window_copy.h" | 9 #include "ash/wm/overview/scoped_window_copy.h" |
10 #include "ash/wm/overview/window_selector_item.h" | 10 #include "ash/wm/overview/window_selector_item.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 public: | 29 public: |
30 WindowSelectorAnimationSettings(aura::Window* window) : | 30 WindowSelectorAnimationSettings(aura::Window* window) : |
31 ui::ScopedLayerAnimationSettings(window->layer()->GetAnimator()) { | 31 ui::ScopedLayerAnimationSettings(window->layer()->GetAnimator()) { |
32 SetPreemptionStrategy( | 32 SetPreemptionStrategy( |
33 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 33 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
34 SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 34 SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
35 ScopedTransformOverviewWindow::kTransitionMilliseconds)); | 35 ScopedTransformOverviewWindow::kTransitionMilliseconds)); |
36 SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN); | 36 SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN); |
37 } | 37 } |
38 | 38 |
39 virtual ~WindowSelectorAnimationSettings() { | 39 ~WindowSelectorAnimationSettings() override {} |
40 } | |
41 }; | 40 }; |
42 | 41 |
43 void SetTransformOnWindow(aura::Window* window, | 42 void SetTransformOnWindow(aura::Window* window, |
44 const gfx::Transform& transform, | 43 const gfx::Transform& transform, |
45 bool animate) { | 44 bool animate) { |
46 if (animate) { | 45 if (animate) { |
47 WindowSelectorAnimationSettings animation_settings(window); | 46 WindowSelectorAnimationSettings animation_settings(window); |
48 window->SetTransform(transform); | 47 window->SetTransform(transform); |
49 } else { | 48 } else { |
50 window->SetTransform(transform); | 49 window->SetTransform(transform); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 } | 264 } |
266 | 265 |
267 void ScopedTransformOverviewWindow::PrepareForOverview() { | 266 void ScopedTransformOverviewWindow::PrepareForOverview() { |
268 DCHECK(!overview_started_); | 267 DCHECK(!overview_started_); |
269 overview_started_ = true; | 268 overview_started_ = true; |
270 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true); | 269 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true); |
271 RestoreWindow(); | 270 RestoreWindow(); |
272 } | 271 } |
273 | 272 |
274 } // namespace ash | 273 } // namespace ash |
OLD | NEW |