| 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 ASH_MUS_BRIDGE_WM_WINDOW_MUS_H_ | 5 #ifndef ASH_MUS_BRIDGE_WM_WINDOW_MUS_H_ |
| 6 #define ASH_MUS_BRIDGE_WM_WINDOW_MUS_H_ | 6 #define ASH_MUS_BRIDGE_WM_WINDOW_MUS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 static ui::Window* GetMusWindow(WmWindow* wm_window) { | 64 static ui::Window* GetMusWindow(WmWindow* wm_window) { |
| 65 return const_cast<ui::Window*>( | 65 return const_cast<ui::Window*>( |
| 66 GetMusWindow(const_cast<const WmWindow*>(wm_window))); | 66 GetMusWindow(const_cast<const WmWindow*>(wm_window))); |
| 67 } | 67 } |
| 68 static const ui::Window* GetMusWindow(const WmWindow* wm_window); | 68 static const ui::Window* GetMusWindow(const WmWindow* wm_window); |
| 69 | 69 |
| 70 static std::vector<WmWindow*> FromMusWindows( | 70 static std::vector<WmWindow*> FromMusWindows( |
| 71 const std::vector<ui::Window*>& mus_windows); | 71 const std::vector<ui::Window*>& mus_windows); |
| 72 | 72 |
| 73 void set_wm_window_type(ui::wm::WindowType type) { |
| 74 wm_window_type_ = type; |
| 75 is_wm_window_type_set_ = true; |
| 76 } |
| 77 |
| 73 // Sets the widget associated with the window. The widget is used to query | 78 // Sets the widget associated with the window. The widget is used to query |
| 74 // state, such as min/max size. The widget is not owned by the WmWindowMus. | 79 // state, such as min/max size. The widget is not owned by the WmWindowMus. |
| 75 void set_widget(views::Widget* widget, WidgetCreationType type) { | 80 void set_widget(views::Widget* widget, WidgetCreationType type) { |
| 76 widget_ = widget; | 81 widget_ = widget; |
| 77 widget_creation_type_ = type; | 82 widget_creation_type_ = type; |
| 78 } | 83 } |
| 79 | 84 |
| 80 ui::Window* mus_window() { return window_; } | 85 ui::Window* mus_window() { return window_; } |
| 81 const ui::Window* mus_window() const { return window_; } | 86 const ui::Window* mus_window() const { return window_; } |
| 82 | 87 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 95 | 100 |
| 96 wm::WindowState* GetWindowState() { return WmWindow::GetWindowState(); } | 101 wm::WindowState* GetWindowState() { return WmWindow::GetWindowState(); } |
| 97 | 102 |
| 98 // See description of |children_use_extended_hit_region_|. | 103 // See description of |children_use_extended_hit_region_|. |
| 99 bool ShouldUseExtendedHitRegion() const; | 104 bool ShouldUseExtendedHitRegion() const; |
| 100 | 105 |
| 101 // Returns true if this window is considered a shell window container. | 106 // Returns true if this window is considered a shell window container. |
| 102 bool IsContainer() const; | 107 bool IsContainer() const; |
| 103 | 108 |
| 104 // WmWindow: | 109 // WmWindow: |
| 110 void Destroy() override; |
| 105 const WmWindow* GetRootWindow() const override; | 111 const WmWindow* GetRootWindow() const override; |
| 106 WmRootWindowController* GetRootWindowController() override; | 112 WmRootWindowController* GetRootWindowController() override; |
| 107 WmShell* GetShell() const override; | 113 WmShell* GetShell() const override; |
| 108 void SetName(const char* name) override; | 114 void SetName(const char* name) override; |
| 109 std::string GetName() const override; | 115 std::string GetName() const override; |
| 110 base::string16 GetTitle() const override; | 116 base::string16 GetTitle() const override; |
| 111 void SetShellWindowId(int id) override; | 117 void SetShellWindowId(int id) override; |
| 112 int GetShellWindowId() const override; | 118 int GetShellWindowId() const override; |
| 113 WmWindow* GetChildByShellWindowId(int id) override; | 119 WmWindow* GetChildByShellWindowId(int id) override; |
| 114 ui::wm::WindowType GetType() const override; | 120 ui::wm::WindowType GetType() const override; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 143 WmWindow* GetToplevelWindowForFocus() override; | 149 WmWindow* GetToplevelWindowForFocus() override; |
| 144 void SetParentUsingContext(WmWindow* context, | 150 void SetParentUsingContext(WmWindow* context, |
| 145 const gfx::Rect& screen_bounds) override; | 151 const gfx::Rect& screen_bounds) override; |
| 146 void AddChild(WmWindow* window) override; | 152 void AddChild(WmWindow* window) override; |
| 147 WmWindow* GetParent() override; | 153 WmWindow* GetParent() override; |
| 148 const WmWindow* GetTransientParent() const override; | 154 const WmWindow* GetTransientParent() const override; |
| 149 std::vector<WmWindow*> GetTransientChildren() override; | 155 std::vector<WmWindow*> GetTransientChildren() override; |
| 150 void SetLayoutManager( | 156 void SetLayoutManager( |
| 151 std::unique_ptr<WmLayoutManager> layout_manager) override; | 157 std::unique_ptr<WmLayoutManager> layout_manager) override; |
| 152 WmLayoutManager* GetLayoutManager() override; | 158 WmLayoutManager* GetLayoutManager() override; |
| 159 void SetVisibilityChangesAnimated() override; |
| 153 void SetVisibilityAnimationType(int type) override; | 160 void SetVisibilityAnimationType(int type) override; |
| 154 void SetVisibilityAnimationDuration(base::TimeDelta delta) override; | 161 void SetVisibilityAnimationDuration(base::TimeDelta delta) override; |
| 155 void SetVisibilityAnimationTransition( | 162 void SetVisibilityAnimationTransition( |
| 156 ::wm::WindowVisibilityAnimationTransition transition) override; | 163 ::wm::WindowVisibilityAnimationTransition transition) override; |
| 157 void Animate(::wm::WindowAnimationType type) override; | 164 void Animate(::wm::WindowAnimationType type) override; |
| 158 void StopAnimatingProperty( | 165 void StopAnimatingProperty( |
| 159 ui::LayerAnimationElement::AnimatableProperty property) override; | 166 ui::LayerAnimationElement::AnimatableProperty property) override; |
| 160 void SetChildWindowVisibilityChangesAnimated() override; | 167 void SetChildWindowVisibilityChangesAnimated() override; |
| 161 void SetMasksToBounds(bool value) override; | 168 void SetMasksToBounds(bool value) override; |
| 162 void SetBounds(const gfx::Rect& bounds) override; | 169 void SetBounds(const gfx::Rect& bounds) override; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 283 |
| 277 // If true child windows should get a slightly larger hit region to make | 284 // If true child windows should get a slightly larger hit region to make |
| 278 // resizing easier. | 285 // resizing easier. |
| 279 bool children_use_extended_hit_region_ = false; | 286 bool children_use_extended_hit_region_ = false; |
| 280 | 287 |
| 281 base::ObserverList<WmTransientWindowObserver, true> transient_observers_; | 288 base::ObserverList<WmTransientWindowObserver, true> transient_observers_; |
| 282 | 289 |
| 283 // If true the minimum size is 0x0, default is minimum size comes from widget. | 290 // If true the minimum size is 0x0, default is minimum size comes from widget. |
| 284 bool use_empty_minimum_size_for_testing_ = false; | 291 bool use_empty_minimum_size_for_testing_ = false; |
| 285 | 292 |
| 293 ui::wm::WindowType wm_window_type_ = ui::wm::WINDOW_TYPE_UNKNOWN; |
| 294 // Set to true if set_window_type() is called. |
| 295 bool is_wm_window_type_set_ = false; |
| 296 |
| 286 DISALLOW_COPY_AND_ASSIGN(WmWindowMus); | 297 DISALLOW_COPY_AND_ASSIGN(WmWindowMus); |
| 287 }; | 298 }; |
| 288 | 299 |
| 289 } // namespace mus | 300 } // namespace mus |
| 290 } // namespace ash | 301 } // namespace ash |
| 291 | 302 |
| 292 #endif // ASH_MUS_BRIDGE_WM_WINDOW_MUS_H_ | 303 #endif // ASH_MUS_BRIDGE_WM_WINDOW_MUS_H_ |
| OLD | NEW |