Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Side by Side Diff: ash/wm/overview/scoped_transform_overview_window.h

Issue 844763006: Change overview mode to so that docked panel windows are not grouped together. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed stale pointer in ScopedTransformOverviewWindow. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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,
77 // &animation_settings); 76 // &animation_settings);
78 // // Calls to SetTransform & SetOpacity will use the same animation settings 77 // // Calls to SetTransform & SetOpacity will use the same animation settings
79 // // until scoped_settings is destroyed. 78 // // until scoped_settings is destroyed.
80 // overview_window.SetTransform(root_window, new_transform); 79 // overview_window.SetTransform(root_window, new_transform);
81 // overview_window.SetOpacity(1); 80 // overview_window.SetOpacity(1);
82 void BeginScopedAnimation( 81 void BeginScopedAnimation(
83 OverviewAnimationType animation_type, 82 OverviewAnimationType animation_type,
84 ScopedAnimationSettings* animation_settings); 83 ScopedAnimationSettings* animation_settings);
85 84
86 // Returns true if this window selector window contains the |target|. 85 // Returns true if this window selector window contains the |target|.
87 bool Contains(const aura::Window* target) const; 86 bool Contains(const aura::Window* target) const;
88 87
89 // Returns the original target bounds of all transformed windows. 88 // Returns the original target bounds of all transformed windows.
90 gfx::Rect GetTargetBoundsInScreen() const; 89 gfx::Rect GetTargetBoundsInScreen() const;
91 90
92 // Restores the window if it was minimized. 91 // Restores and animates the managed window to it's non overview mode state.
93 void RestoreWindow(); 92 void RestoreWindow();
94 93
95 // Restores this window on exit rather than returning it to a minimized state 94 // Forces the managed window to be shown (ie not hidden or minimized) when
96 // if it was minimized on entering overview mode. 95 // calling RestoreWindow().
97 void RestoreWindowOnExit(); 96 void ShowWindowOnExit();
98 97
99 // Informs the ScopedTransformOverviewWindow that the window being watched was 98 // Informs the ScopedTransformOverviewWindow that the window being watched was
100 // destroyed. This resets the internal window pointer to avoid calling 99 // destroyed. This resets the internal window pointer.
101 // anything on the window at destruction time.
102 void OnWindowDestroyed(); 100 void OnWindowDestroyed();
103 101
104 // Prepares for overview mode by doing any necessary actions before entering. 102 // Prepares for overview mode by doing any necessary actions before entering.
105 void PrepareForOverview(); 103 void PrepareForOverview();
106 104
107 // Applies the |transform| to the overview window and all of its transient 105 // Applies the |transform| to the overview window and all of its transient
108 // children. 106 // children.
109 void SetTransform(aura::Window* root_window, 107 void SetTransform(aura::Window* root_window,
110 const gfx::Transform& transform); 108 const gfx::Transform& transform);
111 109
112 // Set's the opacity of the managed windows. 110 // Set's the opacity of the managed windows.
113 void SetOpacity(float opacity); 111 void SetOpacity(float opacity);
114 112
115 aura::Window* window() const { return window_; } 113 aura::Window* window() const { return window_; }
116 114
117 // Closes the transient root of the window managed by |this|. 115 // Closes the transient root of the window managed by |this|.
118 void Close(); 116 void Close();
119 117
120 // ash::TransparentActivateWindowButtonDelegate: 118 // ash::TransparentActivateWindowButtonDelegate:
121 void Select() override; 119 void Select() override;
122 120
123 private: 121 private:
122 // Shows the window if it was minimized.
123 void ShowWindowIfMinimized();
124
124 // A weak pointer to the real window in the overview. 125 // A weak pointer to the real window in the overview.
125 aura::Window* window_; 126 aura::Window* window_;
126 127
127 // The transparent overlay that captures events. 128 // The transparent overlay that captures events.
128 scoped_ptr<TransparentActivateWindowButton> activate_button_; 129 scoped_ptr<TransparentActivateWindowButton> activate_button_;
129 130
130 // If true, the window was minimized and should be restored if the window 131 // If true, the window was minimized and should be restored if the window
131 // was not selected. 132 // was not selected.
132 bool minimized_; 133 bool minimized_;
133 134
(...skipping 12 matching lines...) Expand all
146 147
147 // The original opacity of the window before entering overview mode. 148 // The original opacity of the window before entering overview mode.
148 float original_opacity_; 149 float original_opacity_;
149 150
150 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); 151 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow);
151 }; 152 };
152 153
153 } // namespace ash 154 } // namespace ash
154 155
155 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ 156 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/wm/overview/scoped_transform_overview_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698