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

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

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 years, 6 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 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_WM_WINDOW_H_ 5 #ifndef ASH_COMMON_WM_WINDOW_H_
6 #define ASH_COMMON_WM_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
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "ui/base/ui_base_types.h" 14 #include "ui/base/ui_base_types.h"
15 #include "ui/compositor/layer_animation_element.h" 15 #include "ui/compositor/layer_animation_element.h"
16 #include "ui/wm/core/window_animations.h" 16 #include "ui/wm/core/window_animations.h"
17 #include "ui/wm/public/window_types.h" 17 #include "ui/wm/public/window_types.h"
18 18
19 namespace display { 19 namespace display {
20 class Display; 20 class Display;
21 } 21 }
22 22
23 namespace gfx { 23 namespace gfx {
24 class Point; 24 class Point;
25 class Rect; 25 class Rect;
26 class Size; 26 class Size;
27 class Transform; 27 class Transform;
28 } 28 }
29 29
30 namespace ui { 30 namespace ui {
31 class Layer; 31 class Layer;
32 } 32 }
33 33
34 namespace ash { 34 namespace ash {
35 namespace wm {
36 35
37 class WMEvent;
38 class WmGlobals;
39 class WmLayoutManager; 36 class WmLayoutManager;
40 class WmRootWindowController; 37 class WmRootWindowController;
38 class WmShell;
41 class WmWindowObserver; 39 class WmWindowObserver;
42 enum class WmWindowProperty; 40 enum class WmWindowProperty;
41
42 namespace wm {
43 class WMEvent;
43 class WindowState; 44 class WindowState;
45 }
44 46
45 // This class exists as a porting layer to allow ash/wm to work with 47 // This class exists as a porting layer to allow ash/wm to work with
46 // aura::Window or mus::Window. See aura::Window for details on the functions. 48 // aura::Window or mus::Window. See aura::Window for details on the functions.
47 class ASH_EXPORT WmWindow { 49 class ASH_EXPORT WmWindow {
48 public: 50 public:
49 // See comments in SetBoundsInScreen(). 51 // See comments in SetBoundsInScreen().
50 enum class BoundsInScreenBehavior { 52 enum class BoundsInScreenBehavior {
51 USE_LOCAL_COORDINATES, 53 USE_LOCAL_COORDINATES,
52 USE_SCREEN_COORDINATES, 54 USE_SCREEN_COORDINATES,
53 }; 55 };
54 56
55 WmWindow* GetRootWindow() { 57 WmWindow* GetRootWindow() {
56 return const_cast<WmWindow*>( 58 return const_cast<WmWindow*>(
57 const_cast<const WmWindow*>(this)->GetRootWindow()); 59 const_cast<const WmWindow*>(this)->GetRootWindow());
58 } 60 }
59 virtual const WmWindow* GetRootWindow() const = 0; 61 virtual const WmWindow* GetRootWindow() const = 0;
60 virtual WmRootWindowController* GetRootWindowController() = 0; 62 virtual WmRootWindowController* GetRootWindowController() = 0;
61 63
62 // TODO(sky): fix constness. 64 // TODO(sky): fix constness.
63 virtual WmGlobals* GetGlobals() const = 0; 65 virtual WmShell* GetShell() const = 0;
James Cook 2016/06/03 20:10:47 Not for this CL: Do you think we'll need this goin
sky 2016/06/03 20:13:47 Agreed.
64 66
65 // Used for debugging. 67 // Used for debugging.
66 virtual void SetName(const char* name) = 0; 68 virtual void SetName(const char* name) = 0;
67 69
68 virtual base::string16 GetTitle() const = 0; 70 virtual base::string16 GetTitle() const = 0;
69 71
70 // See shell_window_ids.h for list of known ids. 72 // See shell_window_ids.h for list of known ids.
71 virtual void SetShellWindowId(int id) = 0; 73 virtual void SetShellWindowId(int id) = 0;
72 virtual int GetShellWindowId() const = 0; 74 virtual int GetShellWindowId() const = 0;
73 virtual WmWindow* GetChildByShellWindowId(int id) = 0; 75 virtual WmWindow* GetChildByShellWindowId(int id) = 0;
(...skipping 29 matching lines...) Expand all
103 virtual float GetTargetOpacity() const = 0; 105 virtual float GetTargetOpacity() const = 0;
104 106
105 virtual void SetTransform(const gfx::Transform& transform) = 0; 107 virtual void SetTransform(const gfx::Transform& transform) = 0;
106 virtual gfx::Transform GetTargetTransform() const = 0; 108 virtual gfx::Transform GetTargetTransform() const = 0;
107 109
108 virtual bool IsSystemModal() const = 0; 110 virtual bool IsSystemModal() const = 0;
109 111
110 virtual bool GetBoolProperty(WmWindowProperty key) = 0; 112 virtual bool GetBoolProperty(WmWindowProperty key) = 0;
111 virtual int GetIntProperty(WmWindowProperty key) = 0; 113 virtual int GetIntProperty(WmWindowProperty key) = 0;
112 114
113 WindowState* GetWindowState() { 115 wm::WindowState* GetWindowState() {
114 return const_cast<WindowState*>( 116 return const_cast<wm::WindowState*>(
115 const_cast<const WmWindow*>(this)->GetWindowState()); 117 const_cast<const WmWindow*>(this)->GetWindowState());
116 } 118 }
117 virtual const WindowState* GetWindowState() const = 0; 119 virtual const wm::WindowState* GetWindowState() const = 0;
118 120
119 virtual WmWindow* GetToplevelWindow() = 0; 121 virtual WmWindow* GetToplevelWindow() = 0;
120 122
121 // See aura::client::ParentWindowWithContext() for details of what this does. 123 // See aura::client::ParentWindowWithContext() for details of what this does.
122 virtual void SetParentUsingContext(WmWindow* context, 124 virtual void SetParentUsingContext(WmWindow* context,
123 const gfx::Rect& screen_bounds) = 0; 125 const gfx::Rect& screen_bounds) = 0;
124 virtual void AddChild(WmWindow* window) = 0; 126 virtual void AddChild(WmWindow* window) = 0;
125 127
126 virtual WmWindow* GetParent() = 0; 128 virtual WmWindow* GetParent() = 0;
127 129
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // container. This is used by SetBoundsInScreen(). 252 // container. This is used by SetBoundsInScreen().
251 virtual void SetDescendantsStayInSameRootWindow(bool value) = 0; 253 virtual void SetDescendantsStayInSameRootWindow(bool value) = 0;
252 254
253 virtual void AddObserver(WmWindowObserver* observer) = 0; 255 virtual void AddObserver(WmWindowObserver* observer) = 0;
254 virtual void RemoveObserver(WmWindowObserver* observer) = 0; 256 virtual void RemoveObserver(WmWindowObserver* observer) = 0;
255 257
256 protected: 258 protected:
257 virtual ~WmWindow() {} 259 virtual ~WmWindow() {}
258 }; 260 };
259 261
260 } // namespace wm
261 } // namespace ash 262 } // namespace ash
262 263
263 #endif // ASH_COMMON_WM_WM_WINDOW_H_ 264 #endif // ASH_COMMON_WM_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698