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

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

Issue 2357143004: mash: Support ShelfWindowWatcher via ShelfItem properties. (Closed)
Patch Set: Address comments. Created 4 years, 2 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/shelf/shelf_window_watcher_unittest.cc ('k') | ash/common/wm_window_property.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 23 matching lines...) Expand all
34 } 34 }
35 35
36 namespace views { 36 namespace views {
37 class View; 37 class View;
38 class Widget; 38 class Widget;
39 } 39 }
40 40
41 namespace ash { 41 namespace ash {
42 42
43 class ImmersiveFullscreenController; 43 class ImmersiveFullscreenController;
44 struct ShelfItemDetails;
45 class WmLayoutManager; 44 class WmLayoutManager;
46 class WmRootWindowController; 45 class WmRootWindowController;
47 class WmShell; 46 class WmShell;
48 class WmTransientWindowObserver; 47 class WmTransientWindowObserver;
49 class WmWindowObserver; 48 class WmWindowObserver;
50 enum class WmWindowProperty; 49 enum class WmWindowProperty;
51 50
52 namespace wm { 51 namespace wm {
53 class WindowState; 52 class WindowState;
54 } 53 }
(...skipping 19 matching lines...) Expand all
74 virtual const WmWindow* GetRootWindow() const = 0; 73 virtual const WmWindow* GetRootWindow() const = 0;
75 virtual WmRootWindowController* GetRootWindowController() = 0; 74 virtual WmRootWindowController* GetRootWindowController() = 0;
76 75
77 // TODO(sky): fix constness. 76 // TODO(sky): fix constness.
78 virtual WmShell* GetShell() const = 0; 77 virtual WmShell* GetShell() const = 0;
79 78
80 // Used for debugging. 79 // Used for debugging.
81 virtual void SetName(const char* name) = 0; 80 virtual void SetName(const char* name) = 0;
82 virtual std::string GetName() const = 0; 81 virtual std::string GetName() const = 0;
83 82
83 virtual void SetTitle(const base::string16& title) = 0;
84 virtual base::string16 GetTitle() const = 0; 84 virtual base::string16 GetTitle() const = 0;
85 85
86 // See shell_window_ids.h for list of known ids. 86 // See shell_window_ids.h for list of known ids.
87 virtual void SetShellWindowId(int id) = 0; 87 virtual void SetShellWindowId(int id) = 0;
88 virtual int GetShellWindowId() const = 0; 88 virtual int GetShellWindowId() const = 0;
89 virtual WmWindow* GetChildByShellWindowId(int id) = 0; 89 virtual WmWindow* GetChildByShellWindowId(int id) = 0;
90 90
91 virtual ui::wm::WindowType GetType() const = 0; 91 virtual ui::wm::WindowType GetType() const = 0;
92 92
93 virtual bool IsBubble() = 0; 93 virtual bool IsBubble() = 0;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual gfx::Transform GetTargetTransform() const = 0; 126 virtual gfx::Transform GetTargetTransform() const = 0;
127 127
128 virtual bool IsSystemModal() const = 0; 128 virtual bool IsSystemModal() const = 0;
129 129
130 virtual bool GetBoolProperty(WmWindowProperty key) = 0; 130 virtual bool GetBoolProperty(WmWindowProperty key) = 0;
131 virtual SkColor GetColorProperty(WmWindowProperty key) = 0; 131 virtual SkColor GetColorProperty(WmWindowProperty key) = 0;
132 virtual void SetColorProperty(WmWindowProperty key, SkColor value) = 0; 132 virtual void SetColorProperty(WmWindowProperty key, SkColor value) = 0;
133 virtual int GetIntProperty(WmWindowProperty key) = 0; 133 virtual int GetIntProperty(WmWindowProperty key) = 0;
134 virtual void SetIntProperty(WmWindowProperty key, int value) = 0; 134 virtual void SetIntProperty(WmWindowProperty key, int value) = 0;
135 135
136 // Returns null if there are no details.
137 virtual ShelfItemDetails* GetShelfItemDetails() = 0;
138 virtual void SetShelfItemDetails(const ShelfItemDetails& details) = 0;
139 virtual void ClearShelfItemDetails() = 0;
140
141 wm::WindowState* GetWindowState() { 136 wm::WindowState* GetWindowState() {
142 return const_cast<wm::WindowState*>( 137 return const_cast<wm::WindowState*>(
143 const_cast<const WmWindow*>(this)->GetWindowState()); 138 const_cast<const WmWindow*>(this)->GetWindowState());
144 } 139 }
145 virtual const wm::WindowState* GetWindowState() const = 0; 140 virtual const wm::WindowState* GetWindowState() const = 0;
146 141
147 // The implementation of this matches aura::Window::GetToplevelWindow(). 142 // The implementation of this matches aura::Window::GetToplevelWindow().
148 virtual WmWindow* GetToplevelWindow() = 0; 143 virtual WmWindow* GetToplevelWindow() = 0;
149 // The implementation of this matches 144 // The implementation of this matches
150 // aura::client::ActivationClient::GetToplevelWindow(). 145 // aura::client::ActivationClient::GetToplevelWindow().
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0; 322 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0;
328 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0; 323 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0;
329 324
330 protected: 325 protected:
331 virtual ~WmWindow() {} 326 virtual ~WmWindow() {}
332 }; 327 };
333 328
334 } // namespace ash 329 } // namespace ash
335 330
336 #endif // ASH_COMMON_WM_WINDOW_H_ 331 #endif // ASH_COMMON_WM_WINDOW_H_
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_window_watcher_unittest.cc ('k') | ash/common/wm_window_property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698