| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 return static_cast<WmWindowMus*>(window); | 90 return static_cast<WmWindowMus*>(window); |
| 91 } | 91 } |
| 92 static const WmWindowMus* AsWmWindowMus(const ash::wm::WmWindow* window) { | 92 static const WmWindowMus* AsWmWindowMus(const ash::wm::WmWindow* window) { |
| 93 return static_cast<const WmWindowMus*>(window); | 93 return static_cast<const WmWindowMus*>(window); |
| 94 } | 94 } |
| 95 | 95 |
| 96 ash::wm::WindowState* GetWindowState() { | 96 ash::wm::WindowState* GetWindowState() { |
| 97 return ash::wm::WmWindow::GetWindowState(); | 97 return ash::wm::WmWindow::GetWindowState(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 // See description of |children_use_extended_hit_region_|. |
| 101 bool ShouldUseExtendedHitRegion() const; |
| 102 |
| 100 // WmWindow: | 103 // WmWindow: |
| 101 const ash::wm::WmWindow* GetRootWindow() const override; | 104 const ash::wm::WmWindow* GetRootWindow() const override; |
| 102 ash::wm::WmRootWindowController* GetRootWindowController() override; | 105 ash::wm::WmRootWindowController* GetRootWindowController() override; |
| 103 ash::wm::WmGlobals* GetGlobals() const override; | 106 ash::wm::WmGlobals* GetGlobals() const override; |
| 107 void SetName(const char* name) override; |
| 104 base::string16 GetTitle() const override; | 108 base::string16 GetTitle() const override; |
| 105 void SetShellWindowId(int id) override; | 109 void SetShellWindowId(int id) override; |
| 106 int GetShellWindowId() const override; | 110 int GetShellWindowId() const override; |
| 107 ash::wm::WmWindow* GetChildByShellWindowId(int id) override; | 111 ash::wm::WmWindow* GetChildByShellWindowId(int id) override; |
| 108 ui::wm::WindowType GetType() const override; | 112 ui::wm::WindowType GetType() const override; |
| 109 ui::Layer* GetLayer() override; | 113 ui::Layer* GetLayer() override; |
| 110 display::Display GetDisplayNearestWindow() override; | 114 display::Display GetDisplayNearestWindow() override; |
| 111 bool HasNonClientArea() override; | 115 bool HasNonClientArea() override; |
| 112 int GetNonClientComponent(const gfx::Point& location) override; | 116 int GetNonClientComponent(const gfx::Point& location) override; |
| 113 gfx::Point ConvertPointToTarget(const ash::wm::WmWindow* target, | 117 gfx::Point ConvertPointToTarget(const ash::wm::WmWindow* target, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 138 void SetLayoutManager( | 142 void SetLayoutManager( |
| 139 std::unique_ptr<ash::wm::WmLayoutManager> layout_manager) override; | 143 std::unique_ptr<ash::wm::WmLayoutManager> layout_manager) override; |
| 140 ash::wm::WmLayoutManager* GetLayoutManager() override; | 144 ash::wm::WmLayoutManager* GetLayoutManager() override; |
| 141 void SetVisibilityAnimationType(int type) override; | 145 void SetVisibilityAnimationType(int type) override; |
| 142 void SetVisibilityAnimationDuration(base::TimeDelta delta) override; | 146 void SetVisibilityAnimationDuration(base::TimeDelta delta) override; |
| 143 void SetVisibilityAnimationTransition( | 147 void SetVisibilityAnimationTransition( |
| 144 ::wm::WindowVisibilityAnimationTransition transition) override; | 148 ::wm::WindowVisibilityAnimationTransition transition) override; |
| 145 void Animate(::wm::WindowAnimationType type) override; | 149 void Animate(::wm::WindowAnimationType type) override; |
| 146 void StopAnimatingProperty( | 150 void StopAnimatingProperty( |
| 147 ui::LayerAnimationElement::AnimatableProperty property) override; | 151 ui::LayerAnimationElement::AnimatableProperty property) override; |
| 152 void SetChildWindowVisibilityChangesAnimated() override; |
| 153 void SetMasksToBounds(bool value) override; |
| 148 void SetBounds(const gfx::Rect& bounds) override; | 154 void SetBounds(const gfx::Rect& bounds) override; |
| 149 void SetBoundsWithTransitionDelay(const gfx::Rect& bounds, | 155 void SetBoundsWithTransitionDelay(const gfx::Rect& bounds, |
| 150 base::TimeDelta delta) override; | 156 base::TimeDelta delta) override; |
| 151 void SetBoundsDirect(const gfx::Rect& bounds) override; | 157 void SetBoundsDirect(const gfx::Rect& bounds) override; |
| 152 void SetBoundsDirectAnimated(const gfx::Rect& bounds) override; | 158 void SetBoundsDirectAnimated(const gfx::Rect& bounds) override; |
| 153 void SetBoundsDirectCrossFade(const gfx::Rect& bounds) override; | 159 void SetBoundsDirectCrossFade(const gfx::Rect& bounds) override; |
| 154 void SetBoundsInScreen(const gfx::Rect& bounds_in_screen, | 160 void SetBoundsInScreen(const gfx::Rect& bounds_in_screen, |
| 155 const display::Display& dst_display) override; | 161 const display::Display& dst_display) override; |
| 156 gfx::Rect GetBoundsInScreen() const override; | 162 gfx::Rect GetBoundsInScreen() const override; |
| 157 const gfx::Rect& GetBounds() const override; | 163 const gfx::Rect& GetBounds() const override; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 187 bool CanActivate() const override; | 193 bool CanActivate() const override; |
| 188 void StackChildAtTop(ash::wm::WmWindow* child) override; | 194 void StackChildAtTop(ash::wm::WmWindow* child) override; |
| 189 void StackChildAtBottom(ash::wm::WmWindow* child) override; | 195 void StackChildAtBottom(ash::wm::WmWindow* child) override; |
| 190 void StackChildAbove(ash::wm::WmWindow* child, | 196 void StackChildAbove(ash::wm::WmWindow* child, |
| 191 ash::wm::WmWindow* target) override; | 197 ash::wm::WmWindow* target) override; |
| 192 void StackChildBelow(ash::wm::WmWindow* child, | 198 void StackChildBelow(ash::wm::WmWindow* child, |
| 193 ash::wm::WmWindow* target) override; | 199 ash::wm::WmWindow* target) override; |
| 194 std::vector<ash::wm::WmWindow*> GetChildren() override; | 200 std::vector<ash::wm::WmWindow*> GetChildren() override; |
| 195 void ShowResizeShadow(int component) override; | 201 void ShowResizeShadow(int component) override; |
| 196 void HideResizeShadow() override; | 202 void HideResizeShadow() override; |
| 203 void SetBoundsInScreenBehaviorForChildren( |
| 204 BoundsInScreenBehavior behavior) override; |
| 205 void SetSnapsChildrenToPhysicalPixelBoundary() override; |
| 197 void SnapToPixelBoundaryIfNecessary() override; | 206 void SnapToPixelBoundaryIfNecessary() override; |
| 207 void SetChildrenUseExtendedHitRegion() override; |
| 208 void SetDescendantsStayInSameRootWindow(bool value) override; |
| 198 void AddObserver(ash::wm::WmWindowObserver* observer) override; | 209 void AddObserver(ash::wm::WmWindowObserver* observer) override; |
| 199 void RemoveObserver(ash::wm::WmWindowObserver* observer) override; | 210 void RemoveObserver(ash::wm::WmWindowObserver* observer) override; |
| 200 | 211 |
| 201 private: | 212 private: |
| 202 // mus::WindowObserver: | 213 // mus::WindowObserver: |
| 203 void OnTreeChanged(const TreeChangeParams& params) override; | 214 void OnTreeChanged(const TreeChangeParams& params) override; |
| 204 void OnWindowReordered(mus::Window* window, | 215 void OnWindowReordered(mus::Window* window, |
| 205 mus::Window* relative_window, | 216 mus::Window* relative_window, |
| 206 mus::mojom::OrderDirection direction) override; | 217 mus::mojom::OrderDirection direction) override; |
| 207 void OnWindowSharedPropertyChanged( | 218 void OnWindowSharedPropertyChanged( |
| (...skipping 19 matching lines...) Expand all Loading... |
| 227 WidgetCreationType widget_creation_type_ = WidgetCreationType::INTERNAL; | 238 WidgetCreationType widget_creation_type_ = WidgetCreationType::INTERNAL; |
| 228 | 239 |
| 229 base::ObserverList<ash::wm::WmWindowObserver> observers_; | 240 base::ObserverList<ash::wm::WmWindowObserver> observers_; |
| 230 | 241 |
| 231 std::unique_ptr<MusLayoutManagerAdapter> layout_manager_adapter_; | 242 std::unique_ptr<MusLayoutManagerAdapter> layout_manager_adapter_; |
| 232 | 243 |
| 233 std::unique_ptr<gfx::Rect> restore_bounds_in_screen_; | 244 std::unique_ptr<gfx::Rect> restore_bounds_in_screen_; |
| 234 | 245 |
| 235 ui::WindowShowState restore_show_state_ = ui::SHOW_STATE_DEFAULT; | 246 ui::WindowShowState restore_show_state_ = ui::SHOW_STATE_DEFAULT; |
| 236 | 247 |
| 248 bool snap_children_to_pixel_boundary_ = false; |
| 249 |
| 250 // If true child windows should get a slightly larger hit region to make |
| 251 // resizing easier. |
| 252 bool children_use_extended_hit_region_ = false; |
| 253 |
| 237 DISALLOW_COPY_AND_ASSIGN(WmWindowMus); | 254 DISALLOW_COPY_AND_ASSIGN(WmWindowMus); |
| 238 }; | 255 }; |
| 239 | 256 |
| 240 } // namespace wm | 257 } // namespace wm |
| 241 } // namespace mash | 258 } // namespace mash |
| 242 | 259 |
| 243 #endif // MASH_WM_BRIDGE_WM_WINDOW_MUS_H_ | 260 #endif // MASH_WM_BRIDGE_WM_WINDOW_MUS_H_ |
| OLD | NEW |