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

Side by Side Diff: mash/wm/bridge/wm_window_mus.h

Issue 1984293002: Random fixes for mash bridge classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 7 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 | « mash/wm/bridge/wm_root_window_controller_mus.cc ('k') | mash/wm/bridge/wm_window_mus.cc » ('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 MASH_WM_BRIDGE_WM_WINDOW_MUS_H_ 5 #ifndef MASH_WM_BRIDGE_WM_WINDOW_MUS_H_
6 #define MASH_WM_BRIDGE_WM_WINDOW_MUS_H_ 6 #define MASH_WM_BRIDGE_WM_WINDOW_MUS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/wm/common/wm_window.h" 10 #include "ash/wm/common/wm_window.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 const WmRootWindowControllerMus* GetRootWindowControllerMus() const; 67 const WmRootWindowControllerMus* GetRootWindowControllerMus() const;
68 68
69 static WmWindowMus* AsWmWindowMus(ash::wm::WmWindow* window) { 69 static WmWindowMus* AsWmWindowMus(ash::wm::WmWindow* window) {
70 return static_cast<WmWindowMus*>(window); 70 return static_cast<WmWindowMus*>(window);
71 } 71 }
72 static const WmWindowMus* AsWmWindowMus(const ash::wm::WmWindow* window) { 72 static const WmWindowMus* AsWmWindowMus(const ash::wm::WmWindow* window) {
73 return static_cast<const WmWindowMus*>(window); 73 return static_cast<const WmWindowMus*>(window);
74 } 74 }
75 75
76 ash::wm::WindowState* GetWindowState() {
77 return ash::wm::WmWindow::GetWindowState();
78 }
79
76 // WmWindow: 80 // WmWindow:
77 const ash::wm::WmWindow* GetRootWindow() const override; 81 const ash::wm::WmWindow* GetRootWindow() const override;
78 ash::wm::WmRootWindowController* GetRootWindowController() override; 82 ash::wm::WmRootWindowController* GetRootWindowController() override;
79 ash::wm::WmGlobals* GetGlobals() const override; 83 ash::wm::WmGlobals* GetGlobals() const override;
80 void SetShellWindowId(int id) override; 84 void SetShellWindowId(int id) override;
81 int GetShellWindowId() const override; 85 int GetShellWindowId() const override;
82 ash::wm::WmWindow* GetChildByShellWindowId(int id) override; 86 ash::wm::WmWindow* GetChildByShellWindowId(int id) override;
83 ui::wm::WindowType GetType() const override; 87 ui::wm::WindowType GetType() const override;
84 ui::Layer* GetLayer() override; 88 ui::Layer* GetLayer() override;
85 display::Display GetDisplayNearestWindow() override; 89 display::Display GetDisplayNearestWindow() override;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void StackChildAbove(ash::wm::WmWindow* child, 160 void StackChildAbove(ash::wm::WmWindow* child,
157 ash::wm::WmWindow* target) override; 161 ash::wm::WmWindow* target) override;
158 void StackChildBelow(ash::wm::WmWindow* child, 162 void StackChildBelow(ash::wm::WmWindow* child,
159 ash::wm::WmWindow* target) override; 163 ash::wm::WmWindow* target) override;
160 std::vector<ash::wm::WmWindow*> GetChildren() override; 164 std::vector<ash::wm::WmWindow*> GetChildren() override;
161 void SnapToPixelBoundaryIfNecessary() override; 165 void SnapToPixelBoundaryIfNecessary() override;
162 void AddObserver(ash::wm::WmWindowObserver* observer) override; 166 void AddObserver(ash::wm::WmWindowObserver* observer) override;
163 void RemoveObserver(ash::wm::WmWindowObserver* observer) override; 167 void RemoveObserver(ash::wm::WmWindowObserver* observer) override;
164 168
165 private: 169 private:
166 void NotifyStackingChanged();
167
168 // mus::WindowObserver: 170 // mus::WindowObserver:
169 void OnTreeChanged(const TreeChangeParams& params) override; 171 void OnTreeChanged(const TreeChangeParams& params) override;
170 void OnWindowReordered(mus::Window* window, 172 void OnWindowReordered(mus::Window* window,
171 mus::Window* relative_window, 173 mus::Window* relative_window,
172 mus::mojom::OrderDirection direction) override; 174 mus::mojom::OrderDirection direction) override;
173 void OnWindowSharedPropertyChanged( 175 void OnWindowSharedPropertyChanged(
174 mus::Window* window, 176 mus::Window* window,
175 const std::string& name, 177 const std::string& name,
176 const std::vector<uint8_t>* old_data, 178 const std::vector<uint8_t>* old_data,
177 const std::vector<uint8_t>* new_data) override; 179 const std::vector<uint8_t>* new_data) override;
178 void OnWindowBoundsChanged(mus::Window* window, 180 void OnWindowBoundsChanged(mus::Window* window,
179 const gfx::Rect& old_bounds, 181 const gfx::Rect& old_bounds,
180 const gfx::Rect& new_bounds) override; 182 const gfx::Rect& new_bounds) override;
181 void OnWindowDestroying(mus::Window* window) override; 183 void OnWindowDestroying(mus::Window* window) override;
182 184
183 mus::Window* window_; 185 mus::Window* window_;
186
187 int shell_window_id_ = -1;
James Cook 2016/05/17 16:36:04 nit: Is this a container id? If so, may comment th
sky 2016/05/17 16:59:46 It's one of the ids defined in wm_shell_window_ids
188
184 std::unique_ptr<ash::wm::WindowState> window_state_; 189 std::unique_ptr<ash::wm::WindowState> window_state_;
185 190
186 views::Widget* widget_ = nullptr; 191 views::Widget* widget_ = nullptr;
187 192
188 base::ObserverList<ash::wm::WmWindowObserver> observers_; 193 base::ObserverList<ash::wm::WmWindowObserver> observers_;
189 194
190 std::unique_ptr<MusLayoutManagerAdapter> layout_manager_adapter_; 195 std::unique_ptr<MusLayoutManagerAdapter> layout_manager_adapter_;
191 196
192 std::unique_ptr<gfx::Rect> restore_bounds_in_screen_; 197 std::unique_ptr<gfx::Rect> restore_bounds_in_screen_;
193 198
194 ui::WindowShowState restore_show_state_ = ui::SHOW_STATE_DEFAULT; 199 ui::WindowShowState restore_show_state_ = ui::SHOW_STATE_DEFAULT;
195 200
196 DISALLOW_COPY_AND_ASSIGN(WmWindowMus); 201 DISALLOW_COPY_AND_ASSIGN(WmWindowMus);
197 }; 202 };
198 203
199 } // namespace wm 204 } // namespace wm
200 } // namespace mash 205 } // namespace mash
201 206
202 #endif // MASH_WM_BRIDGE_WM_WINDOW_MUS_H_ 207 #endif // MASH_WM_BRIDGE_WM_WINDOW_MUS_H_
OLDNEW
« no previous file with comments | « mash/wm/bridge/wm_root_window_controller_mus.cc ('k') | mash/wm/bridge/wm_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698