| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 // The shell window id of this window. Shell window ids are defined in |
| 188 // ash/wm/common/wm_shell_window_ids.h. |
| 189 int shell_window_id_ = -1; |
| 190 |
| 184 std::unique_ptr<ash::wm::WindowState> window_state_; | 191 std::unique_ptr<ash::wm::WindowState> window_state_; |
| 185 | 192 |
| 186 views::Widget* widget_ = nullptr; | 193 views::Widget* widget_ = nullptr; |
| 187 | 194 |
| 188 base::ObserverList<ash::wm::WmWindowObserver> observers_; | 195 base::ObserverList<ash::wm::WmWindowObserver> observers_; |
| 189 | 196 |
| 190 std::unique_ptr<MusLayoutManagerAdapter> layout_manager_adapter_; | 197 std::unique_ptr<MusLayoutManagerAdapter> layout_manager_adapter_; |
| 191 | 198 |
| 192 std::unique_ptr<gfx::Rect> restore_bounds_in_screen_; | 199 std::unique_ptr<gfx::Rect> restore_bounds_in_screen_; |
| 193 | 200 |
| 194 ui::WindowShowState restore_show_state_ = ui::SHOW_STATE_DEFAULT; | 201 ui::WindowShowState restore_show_state_ = ui::SHOW_STATE_DEFAULT; |
| 195 | 202 |
| 196 DISALLOW_COPY_AND_ASSIGN(WmWindowMus); | 203 DISALLOW_COPY_AND_ASSIGN(WmWindowMus); |
| 197 }; | 204 }; |
| 198 | 205 |
| 199 } // namespace wm | 206 } // namespace wm |
| 200 } // namespace mash | 207 } // namespace mash |
| 201 | 208 |
| 202 #endif // MASH_WM_BRIDGE_WM_WINDOW_MUS_H_ | 209 #endif // MASH_WM_BRIDGE_WM_WINDOW_MUS_H_ |
| OLD | NEW |