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 "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 // Manages a window in the overview mode. This class allows transforming the | 29 // Manages a window in the overview mode. This class allows transforming the |
30 // window with a helper to determine the best fit in certain bounds and | 30 // window with a helper to determine the best fit in certain bounds and |
31 // copies the window if being moved to another display. The window's state is | 31 // copies the window if being moved to another display. The window's state is |
32 // restored on destruction of this object. | 32 // restored on destruction of this object. |
33 class ScopedTransformOverviewWindow { | 33 class ScopedTransformOverviewWindow { |
34 public: | 34 public: |
35 // The duration of transitions used for window transforms. | 35 // The duration of transitions used for window transforms. |
36 static const int kTransitionMilliseconds; | 36 static const int kTransitionMilliseconds; |
37 | 37 |
38 // The time for the different views that must be shown to fade in, ie window | |
39 // labels and close buttons | |
tdanderson
2014/04/10 22:37:12
I'd reword to be more like the old comment to make
Nina
2014/04/14 16:24:04
Done.
| |
40 static const int kFadeInMilliseconds; | |
41 | |
38 // Returns |rect| having been shrunk to fit within |bounds| (preserving the | 42 // Returns |rect| having been shrunk to fit within |bounds| (preserving the |
39 // aspect ratio). | 43 // aspect ratio). |
40 static gfx::Rect ShrinkRectToFitPreservingAspectRatio( | 44 static gfx::Rect ShrinkRectToFitPreservingAspectRatio( |
41 const gfx::Rect& rect, | 45 const gfx::Rect& rect, |
42 const gfx::Rect& bounds); | 46 const gfx::Rect& bounds); |
43 | 47 |
44 // Returns the transform turning |src_rect| into |dst_rect|. | 48 // Returns the transform turning |src_rect| into |dst_rect|. |
45 static gfx::Transform GetTransformForRect(const gfx::Rect& src_rect, | 49 static gfx::Transform GetTransformForRect(const gfx::Rect& src_rect, |
46 const gfx::Rect& dst_rect); | 50 const gfx::Rect& dst_rect); |
47 | 51 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 | 113 |
110 // The original transform of the window before entering overview mode. | 114 // The original transform of the window before entering overview mode. |
111 gfx::Transform original_transform_; | 115 gfx::Transform original_transform_; |
112 | 116 |
113 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); | 117 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); |
114 }; | 118 }; |
115 | 119 |
116 } // namespace ash | 120 } // namespace ash |
117 | 121 |
118 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ | 122 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ |
OLD | NEW |