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 #ifndef ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ | 5 #ifndef ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ |
6 #define ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ | 6 #define ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
11 | 11 |
12 namespace aura { | 12 namespace aura { |
13 class RootWindow; | |
14 class Window; | 13 class Window; |
15 } | 14 } |
16 | 15 |
17 namespace ui { | 16 namespace ui { |
18 class Layer; | 17 class Layer; |
19 } | 18 } |
20 | 19 |
21 namespace views { | 20 namespace views { |
22 class Widget; | 21 class Widget; |
23 } | 22 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // destroyed. This resets the internal window pointer to avoid calling | 63 // destroyed. This resets the internal window pointer to avoid calling |
65 // anything on the window at destruction time. | 64 // anything on the window at destruction time. |
66 void OnWindowDestroyed(); | 65 void OnWindowDestroyed(); |
67 | 66 |
68 // Prepares for overview mode by doing any necessary actions before entering. | 67 // Prepares for overview mode by doing any necessary actions before entering. |
69 virtual void PrepareForOverview(); | 68 virtual void PrepareForOverview(); |
70 | 69 |
71 // Sets |transform| on the window and a copy of the window if the target | 70 // Sets |transform| on the window and a copy of the window if the target |
72 // |root_window| is not the window's root window. If |animate| the transform | 71 // |root_window| is not the window's root window. If |animate| the transform |
73 // is animated in, otherwise it is immediately applied. | 72 // is animated in, otherwise it is immediately applied. |
74 void SetTransform(aura::RootWindow* root_window, | 73 void SetTransform(aura::Window* root_window, |
75 const gfx::Transform& transform, | 74 const gfx::Transform& transform, |
76 bool animate); | 75 bool animate); |
77 | 76 |
78 aura::Window* window() const { return window_; } | 77 aura::Window* window() const { return window_; } |
79 | 78 |
80 private: | 79 private: |
81 // Applies the |transform| to the overview window and all of its transient | 80 // Applies the |transform| to the overview window and all of its transient |
82 // children using animations. If |animate| the transform is animated in, | 81 // children using animations. If |animate| the transform is animated in, |
83 // otherwise it is applied immediately. | 82 // otherwise it is applied immediately. |
84 void SetTransformOnWindowAndTransientChildren(const gfx::Transform& transform, | 83 void SetTransformOnWindowAndTransientChildren(const gfx::Transform& transform, |
(...skipping 20 matching lines...) Expand all Loading... |
105 | 104 |
106 // The original transform of the window before entering overview mode. | 105 // The original transform of the window before entering overview mode. |
107 gfx::Transform original_transform_; | 106 gfx::Transform original_transform_; |
108 | 107 |
109 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); | 108 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); |
110 }; | 109 }; |
111 | 110 |
112 } // namespace ash | 111 } // namespace ash |
113 | 112 |
114 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ | 113 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ |
OLD | NEW |