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

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

Issue 1901773002: Removes most of aura dependencies from DefaultState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wm_window_positioner
Patch Set: nit and merge Created 4 years, 8 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/wm/common/wm_root_window_controller.h ('k') | ash/wm/common/workspace/workspace_types.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_WM_COMMON_WM_WINDOW_H_ 5 #ifndef ASH_WM_COMMON_WM_WINDOW_H_
6 #define ASH_WM_COMMON_WM_WINDOW_H_ 6 #define ASH_WM_COMMON_WM_WINDOW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "ui/base/ui_base_types.h" 12 #include "ui/base/ui_base_types.h"
13 #include "ui/wm/core/window_animations.h"
13 #include "ui/wm/public/window_types.h" 14 #include "ui/wm/public/window_types.h"
14 15
15 namespace gfx { 16 namespace gfx {
16 class Display; 17 class Display;
17 class Point; 18 class Point;
18 class Rect; 19 class Rect;
19 class Size; 20 class Size;
20 } 21 }
21 22
22 namespace ui { 23 namespace ui {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual bool GetBoolProperty(WmWindowProperty key) = 0; 82 virtual bool GetBoolProperty(WmWindowProperty key) = 0;
82 83
83 WindowState* GetWindowState() { 84 WindowState* GetWindowState() {
84 return const_cast<WindowState*>( 85 return const_cast<WindowState*>(
85 const_cast<const WmWindow*>(this)->GetWindowState()); 86 const_cast<const WmWindow*>(this)->GetWindowState());
86 } 87 }
87 virtual const WindowState* GetWindowState() const = 0; 88 virtual const WindowState* GetWindowState() const = 0;
88 89
89 virtual WmWindow* GetToplevelWindow() = 0; 90 virtual WmWindow* GetToplevelWindow() = 0;
90 91
92 virtual void AddChild(WmWindow* window) = 0;
93
91 virtual WmWindow* GetParent() = 0; 94 virtual WmWindow* GetParent() = 0;
92 95
93 virtual WmWindow* GetTransientParent() = 0; 96 virtual WmWindow* GetTransientParent() = 0;
94 virtual std::vector<WmWindow*> GetTransientChildren() = 0; 97 virtual std::vector<WmWindow*> GetTransientChildren() = 0;
95 98
99 // |type| is WindowVisibilityAnimationType. Has to be an int to match aura.
100 virtual void SetVisibilityAnimationType(int type) = 0;
101 virtual void Animate(::wm::WindowAnimationType type) = 0;
102
96 virtual void SetBounds(const gfx::Rect& bounds) = 0; 103 virtual void SetBounds(const gfx::Rect& bounds) = 0;
97 virtual void SetBoundsWithTransitionDelay(const gfx::Rect& bounds, 104 virtual void SetBoundsWithTransitionDelay(const gfx::Rect& bounds,
98 base::TimeDelta delta) = 0; 105 base::TimeDelta delta) = 0;
99 // Sets the bounds in such a way that LayoutManagers are circumvented. 106 // Sets the bounds in such a way that LayoutManagers are circumvented.
100 virtual void SetBoundsDirect(const gfx::Rect& bounds) = 0; 107 virtual void SetBoundsDirect(const gfx::Rect& bounds) = 0;
101 virtual void SetBoundsDirectAnimated(const gfx::Rect& bounds) = 0; 108 virtual void SetBoundsDirectAnimated(const gfx::Rect& bounds) = 0;
102 virtual void SetBoundsDirectCrossFade(const gfx::Rect& bounds) = 0; 109 virtual void SetBoundsDirectCrossFade(const gfx::Rect& bounds) = 0;
103 virtual void SetBoundsInScreen(const gfx::Rect& bounds_in_screen, 110 virtual void SetBoundsInScreen(const gfx::Rect& bounds_in_screen,
104 const gfx::Display& dst_display) = 0; 111 const gfx::Display& dst_display) = 0;
105 virtual gfx::Rect GetBoundsInScreen() const = 0; 112 virtual gfx::Rect GetBoundsInScreen() const = 0;
106 virtual const gfx::Rect& GetBounds() const = 0; 113 virtual const gfx::Rect& GetBounds() const = 0;
107 virtual gfx::Rect GetTargetBounds() = 0; 114 virtual gfx::Rect GetTargetBounds() = 0;
108 115
109 virtual void ClearRestoreBounds() = 0; 116 virtual void ClearRestoreBounds() = 0;
110 virtual void SetRestoreBoundsInScreen(const gfx::Rect& bounds) = 0; 117 virtual void SetRestoreBoundsInScreen(const gfx::Rect& bounds) = 0;
111 virtual gfx::Rect GetRestoreBoundsInScreen() const = 0; 118 virtual gfx::Rect GetRestoreBoundsInScreen() const = 0;
112 119
113 virtual void OnWMEvent(const wm::WMEvent* event) = 0; 120 virtual void OnWMEvent(const wm::WMEvent* event) = 0;
114 121
115 virtual bool Contains(const WmWindow* other) const = 0; 122 virtual bool Contains(const WmWindow* other) const = 0;
116 123
117 virtual void SetShowState(ui::WindowShowState show_state) = 0; 124 virtual void SetShowState(ui::WindowShowState show_state) = 0;
118 virtual ui::WindowShowState GetShowState() const = 0; 125 virtual ui::WindowShowState GetShowState() const = 0;
119 126
127 virtual void SetRestoreShowState(ui::WindowShowState show_state) = 0;
128
120 virtual void SetCapture() = 0; 129 virtual void SetCapture() = 0;
121 virtual bool HasCapture() = 0; 130 virtual bool HasCapture() = 0;
122 virtual void ReleaseCapture() = 0; 131 virtual void ReleaseCapture() = 0;
123 132
124 virtual bool HasRestoreBounds() const = 0; 133 virtual bool HasRestoreBounds() const = 0;
125 134
126 virtual void SetAlwaysOnTop(bool value) = 0; 135 virtual void SetAlwaysOnTop(bool value) = 0;
127 virtual bool IsAlwaysOnTop() const = 0; 136 virtual bool IsAlwaysOnTop() const = 0;
128 137
129 virtual void Hide() = 0; 138 virtual void Hide() = 0;
(...skipping 22 matching lines...) Expand all
152 virtual void RemoveObserver(WmWindowObserver* observer) = 0; 161 virtual void RemoveObserver(WmWindowObserver* observer) = 0;
153 162
154 protected: 163 protected:
155 virtual ~WmWindow() {} 164 virtual ~WmWindow() {}
156 }; 165 };
157 166
158 } // namespace wm 167 } // namespace wm
159 } // namespace ash 168 } // namespace ash
160 169
161 #endif // ASH_WM_COMMON_WM_WINDOW_H_ 170 #endif // ASH_WM_COMMON_WM_WINDOW_H_
OLDNEW
« no previous file with comments | « ash/wm/common/wm_root_window_controller.h ('k') | ash/wm/common/workspace/workspace_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698