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

Side by Side Diff: ash/common/wm_window.h

Issue 2320273002: Refactors DimWindow and moves to ash/common (Closed)
Patch Set: feedback and member initializer ordering Created 4 years, 3 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
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/common/wm_window_user_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMMON_WM_WINDOW_H_ 5 #ifndef ASH_COMMON_WM_WINDOW_H_
6 #define ASH_COMMON_WM_WINDOW_H_ 6 #define ASH_COMMON_WM_WINDOW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 class ASH_EXPORT WmWindow { 57 class ASH_EXPORT WmWindow {
58 public: 58 public:
59 // See comments in SetBoundsInScreen(). 59 // See comments in SetBoundsInScreen().
60 enum class BoundsInScreenBehavior { 60 enum class BoundsInScreenBehavior {
61 USE_LOCAL_COORDINATES, 61 USE_LOCAL_COORDINATES,
62 USE_SCREEN_COORDINATES, 62 USE_SCREEN_COORDINATES,
63 }; 63 };
64 64
65 using Windows = std::vector<WmWindow*>; 65 using Windows = std::vector<WmWindow*>;
66 66
67 virtual void Destroy() = 0;
68
67 WmWindow* GetRootWindow() { 69 WmWindow* GetRootWindow() {
68 return const_cast<WmWindow*>( 70 return const_cast<WmWindow*>(
69 const_cast<const WmWindow*>(this)->GetRootWindow()); 71 const_cast<const WmWindow*>(this)->GetRootWindow());
70 } 72 }
71 virtual const WmWindow* GetRootWindow() const = 0; 73 virtual const WmWindow* GetRootWindow() const = 0;
72 virtual WmRootWindowController* GetRootWindowController() = 0; 74 virtual WmRootWindowController* GetRootWindowController() = 0;
73 75
74 // TODO(sky): fix constness. 76 // TODO(sky): fix constness.
75 virtual WmShell* GetShell() const = 0; 77 virtual WmShell* GetShell() const = 0;
76 78
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return const_cast<WmWindow*>( 156 return const_cast<WmWindow*>(
155 const_cast<const WmWindow*>(this)->GetTransientParent()); 157 const_cast<const WmWindow*>(this)->GetTransientParent());
156 } 158 }
157 virtual const WmWindow* GetTransientParent() const = 0; 159 virtual const WmWindow* GetTransientParent() const = 0;
158 virtual Windows GetTransientChildren() = 0; 160 virtual Windows GetTransientChildren() = 0;
159 161
160 virtual void SetLayoutManager( 162 virtual void SetLayoutManager(
161 std::unique_ptr<WmLayoutManager> layout_manager) = 0; 163 std::unique_ptr<WmLayoutManager> layout_manager) = 0;
162 virtual WmLayoutManager* GetLayoutManager() = 0; 164 virtual WmLayoutManager* GetLayoutManager() = 0;
163 165
166 // See wm::SetWindowVisibilityChangesAnimated() for details on what this
167 // does.
168 virtual void SetVisibilityChangesAnimated() = 0;
164 // |type| is WindowVisibilityAnimationType. Has to be an int to match aura. 169 // |type| is WindowVisibilityAnimationType. Has to be an int to match aura.
165 virtual void SetVisibilityAnimationType(int type) = 0; 170 virtual void SetVisibilityAnimationType(int type) = 0;
166 virtual void SetVisibilityAnimationDuration(base::TimeDelta delta) = 0; 171 virtual void SetVisibilityAnimationDuration(base::TimeDelta delta) = 0;
167 virtual void SetVisibilityAnimationTransition( 172 virtual void SetVisibilityAnimationTransition(
168 ::wm::WindowVisibilityAnimationTransition transition) = 0; 173 ::wm::WindowVisibilityAnimationTransition transition) = 0;
169 virtual void Animate(::wm::WindowAnimationType type) = 0; 174 virtual void Animate(::wm::WindowAnimationType type) = 0;
170 virtual void StopAnimatingProperty( 175 virtual void StopAnimatingProperty(
171 ui::LayerAnimationElement::AnimatableProperty property) = 0; 176 ui::LayerAnimationElement::AnimatableProperty property) = 0;
172 virtual void SetChildWindowVisibilityChangesAnimated() = 0; 177 virtual void SetChildWindowVisibilityChangesAnimated() = 0;
173 178
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0; 319 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0;
315 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0; 320 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0;
316 321
317 protected: 322 protected:
318 virtual ~WmWindow() {} 323 virtual ~WmWindow() {}
319 }; 324 };
320 325
321 } // namespace ash 326 } // namespace ash
322 327
323 #endif // ASH_COMMON_WM_WINDOW_H_ 328 #endif // ASH_COMMON_WM_WINDOW_H_
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/common/wm_window_user_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698