| 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_COMMON_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ |
| 6 #define ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ | 6 #define ASH_COMMON_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/wm/overview/overview_animation_type.h" | 12 #include "ash/common/wm/overview/overview_animation_type.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
| 15 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Rect; | 18 class Rect; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace ash { | 21 namespace ash { |
| 22 | 22 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Example: | 70 // Example: |
| 71 // ScopedTransformOverviewWindow overview_window(window); | 71 // ScopedTransformOverviewWindow overview_window(window); |
| 72 // ScopedTransformOverviewWindow::ScopedAnimationSettings scoped_settings; | 72 // ScopedTransformOverviewWindow::ScopedAnimationSettings scoped_settings; |
| 73 // overview_window.BeginScopedAnimation( | 73 // overview_window.BeginScopedAnimation( |
| 74 // OverviewAnimationType::OVERVIEW_ANIMATION_SELECTOR_ITEM_SCROLL_CANCEL, | 74 // OverviewAnimationType::OVERVIEW_ANIMATION_SELECTOR_ITEM_SCROLL_CANCEL, |
| 75 // &animation_settings); | 75 // &animation_settings); |
| 76 // // Calls to SetTransform & SetOpacity will use the same animation settings | 76 // // Calls to SetTransform & SetOpacity will use the same animation settings |
| 77 // // until scoped_settings is destroyed. | 77 // // until scoped_settings is destroyed. |
| 78 // overview_window.SetTransform(root_window, new_transform); | 78 // overview_window.SetTransform(root_window, new_transform); |
| 79 // overview_window.SetOpacity(1); | 79 // overview_window.SetOpacity(1); |
| 80 void BeginScopedAnimation( | 80 void BeginScopedAnimation(OverviewAnimationType animation_type, |
| 81 OverviewAnimationType animation_type, | 81 ScopedAnimationSettings* animation_settings); |
| 82 ScopedAnimationSettings* animation_settings); | |
| 83 | 82 |
| 84 // Returns true if this window selector window contains the |target|. | 83 // Returns true if this window selector window contains the |target|. |
| 85 bool Contains(const WmWindow* target) const; | 84 bool Contains(const WmWindow* target) const; |
| 86 | 85 |
| 87 // Returns the original target bounds of all transformed windows. | 86 // Returns the original target bounds of all transformed windows. |
| 88 gfx::Rect GetTargetBoundsInScreen() const; | 87 gfx::Rect GetTargetBoundsInScreen() const; |
| 89 | 88 |
| 90 // Restores and animates the managed window to it's non overview mode state. | 89 // Restores and animates the managed window to it's non overview mode state. |
| 91 void RestoreWindow(); | 90 void RestoreWindow(); |
| 92 | 91 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 gfx::Transform overview_transform_; | 145 gfx::Transform overview_transform_; |
| 147 | 146 |
| 148 // The original opacity of the window before entering overview mode. | 147 // The original opacity of the window before entering overview mode. |
| 149 float original_opacity_; | 148 float original_opacity_; |
| 150 | 149 |
| 151 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); | 150 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); |
| 152 }; | 151 }; |
| 153 | 152 |
| 154 } // namespace ash | 153 } // namespace ash |
| 155 | 154 |
| 156 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ | 155 #endif // ASH_COMMON_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ |
| OLD | NEW |