| 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 "ash/wm/overview/scoped_overview_animation_settings.h" | 8 #include "ash/wm/overview/scoped_overview_animation_settings.h" |
| 9 #include "ash/wm/overview/transparent_activate_window_button.h" | 9 #include "ash/wm/overview/transparent_activate_window_button.h" |
| 10 #include "ash/wm/overview/transparent_activate_window_button_delegate.h" | 10 #include "ash/wm/overview/transparent_activate_window_button_delegate.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 gfx::Transform get_overview_transform() const { return overview_transform_; } | 56 gfx::Transform get_overview_transform() const { return overview_transform_; } |
| 57 | 57 |
| 58 void set_overview_transform(const gfx::Transform& transform) { | 58 void set_overview_transform(const gfx::Transform& transform) { |
| 59 overview_transform_ = transform; | 59 overview_transform_ = transform; |
| 60 } | 60 } |
| 61 | 61 |
| 62 TransparentActivateWindowButton* activate_button() { | 62 TransparentActivateWindowButton* activate_button() { |
| 63 return activate_button_.get(); | 63 return activate_button_.get(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 | |
| 67 // Starts an animation sequence which will use animation settings specified by | 66 // Starts an animation sequence which will use animation settings specified by |
| 68 // |animation_type|. The |animation_settings| container is populated with | 67 // |animation_type|. The |animation_settings| container is populated with |
| 69 // scoped entities and the container should be destroyed at the end of the | 68 // scoped entities and the container should be destroyed at the end of the |
| 70 // animation sequence. | 69 // animation sequence. |
| 71 // | 70 // |
| 72 // Example: | 71 // Example: |
| 73 // ScopedTransformOverviewWindow overview_window(window); | 72 // ScopedTransformOverviewWindow overview_window(window); |
| 74 // ScopedTransformOverviewWindow::ScopedAnimationSettings scoped_settings; | 73 // ScopedTransformOverviewWindow::ScopedAnimationSettings scoped_settings; |
| 75 // overview_window.BeginScopedAnimation( | 74 // overview_window.BeginScopedAnimation( |
| 76 // OverviewAnimationType::OVERVIEW_ANIMATION_SELECTOR_ITEM_SCROLL_CANCEL, | 75 // OverviewAnimationType::OVERVIEW_ANIMATION_SELECTOR_ITEM_SCROLL_CANCEL, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 107 // Applies the |transform| to the overview window and all of its transient | 106 // Applies the |transform| to the overview window and all of its transient |
| 108 // children. | 107 // children. |
| 109 void SetTransform(aura::Window* root_window, | 108 void SetTransform(aura::Window* root_window, |
| 110 const gfx::Transform& transform); | 109 const gfx::Transform& transform); |
| 111 | 110 |
| 112 // Set's the opacity of the managed windows. | 111 // Set's the opacity of the managed windows. |
| 113 void SetOpacity(float opacity); | 112 void SetOpacity(float opacity); |
| 114 | 113 |
| 115 aura::Window* window() const { return window_; } | 114 aura::Window* window() const { return window_; } |
| 116 | 115 |
| 117 // Closes the transient root of the window managed by |this|. | |
| 118 void Close(); | |
| 119 | |
| 120 // ash::TransparentActivateWindowButtonDelegate: | 116 // ash::TransparentActivateWindowButtonDelegate: |
| 117 void Scroll(int delta_x) override; |
| 118 void CancelScroll() override; |
| 119 void Close() override; |
| 121 void Select() override; | 120 void Select() override; |
| 122 | 121 |
| 123 private: | 122 private: |
| 124 // A weak pointer to the real window in the overview. | 123 // A weak pointer to the real window in the overview. |
| 125 aura::Window* window_; | 124 aura::Window* window_; |
| 126 | 125 |
| 127 // The transparent overlay that captures events. | 126 // The transparent overlay that captures events. |
| 128 scoped_ptr<TransparentActivateWindowButton> activate_button_; | 127 scoped_ptr<TransparentActivateWindowButton> activate_button_; |
| 129 | 128 |
| 130 // If true, the window was minimized and should be restored if the window | 129 // If true, the window was minimized and should be restored if the window |
| (...skipping 15 matching lines...) Expand all Loading... |
| 146 | 145 |
| 147 // The original opacity of the window before entering overview mode. | 146 // The original opacity of the window before entering overview mode. |
| 148 float original_opacity_; | 147 float original_opacity_; |
| 149 | 148 |
| 150 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); | 149 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); |
| 151 }; | 150 }; |
| 152 | 151 |
| 153 } // namespace ash | 152 } // namespace ash |
| 154 | 153 |
| 155 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ | 154 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ |
| OLD | NEW |