| 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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "ui/aura/env_observer.h" | 12 #include "ui/aura/env_observer.h" |
| 13 #include "ui/aura/mus/window_tree_host_mus.h" | 13 #include "ui/aura/mus/window_tree_host_mus.h" |
| 14 #include "ui/views/mus/mus_client_observer.h" | 14 #include "ui/views/mus/mus_client_observer.h" |
| 15 #include "ui/views/mus/mus_export.h" | 15 #include "ui/views/mus/mus_export.h" |
| 16 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" | 16 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" |
| 17 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
| 18 | 18 |
| 19 namespace wm { |
| 20 class CursorManager; |
| 21 } |
| 22 |
| 19 namespace views { | 23 namespace views { |
| 20 | 24 |
| 21 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus | 25 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus |
| 22 : public DesktopWindowTreeHost, | 26 : public DesktopWindowTreeHost, |
| 23 public MusClientObserver, | 27 public MusClientObserver, |
| 24 public aura::WindowTreeHostMus, | 28 public aura::WindowTreeHostMus, |
| 25 public aura::EnvObserver { | 29 public aura::EnvObserver { |
| 26 public: | 30 public: |
| 27 DesktopWindowTreeHostMus( | 31 DesktopWindowTreeHostMus( |
| 28 internal::NativeWidgetDelegate* native_widget_delegate, | 32 internal::NativeWidgetDelegate* native_widget_delegate, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 bool IsFullscreen() const override; | 99 bool IsFullscreen() const override; |
| 96 void SetOpacity(float opacity) override; | 100 void SetOpacity(float opacity) override; |
| 97 void SetWindowIcons(const gfx::ImageSkia& window_icon, | 101 void SetWindowIcons(const gfx::ImageSkia& window_icon, |
| 98 const gfx::ImageSkia& app_icon) override; | 102 const gfx::ImageSkia& app_icon) override; |
| 99 void InitModalType(ui::ModalType modal_type) override; | 103 void InitModalType(ui::ModalType modal_type) override; |
| 100 void FlashFrame(bool flash_frame) override; | 104 void FlashFrame(bool flash_frame) override; |
| 101 bool IsAnimatingClosed() const override; | 105 bool IsAnimatingClosed() const override; |
| 102 bool IsTranslucentWindowOpacitySupported() const override; | 106 bool IsTranslucentWindowOpacitySupported() const override; |
| 103 void SizeConstraintsChanged() override; | 107 void SizeConstraintsChanged() override; |
| 104 bool ShouldUpdateWindowTransparency() const override; | 108 bool ShouldUpdateWindowTransparency() const override; |
| 109 bool ShouldUseDesktopNativeCursorManager() const override; |
| 105 | 110 |
| 106 // MusClientObserver: | 111 // MusClientObserver: |
| 107 void OnWindowManagerFrameValuesChanged() override; | 112 void OnWindowManagerFrameValuesChanged() override; |
| 108 | 113 |
| 109 // WindowTreeHostMus: | 114 // WindowTreeHostMus: |
| 110 void ShowImpl() override; | 115 void ShowImpl() override; |
| 111 void HideImpl() override; | 116 void HideImpl() override; |
| 112 void SetBoundsInPixels(const gfx::Rect& bounds_in_pixels) override; | 117 void SetBoundsInPixels(const gfx::Rect& bounds_in_pixels) override; |
| 113 | 118 |
| 114 // aura::EnvObserver: | 119 // aura::EnvObserver: |
| 115 void OnWindowInitialized(aura::Window* window) override; | 120 void OnWindowInitialized(aura::Window* window) override; |
| 116 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, | 121 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, |
| 117 aura::Window* window) override; | 122 aura::Window* window) override; |
| 118 | 123 |
| 119 internal::NativeWidgetDelegate* native_widget_delegate_; | 124 internal::NativeWidgetDelegate* native_widget_delegate_; |
| 120 | 125 |
| 121 DesktopNativeWidgetAura* desktop_native_widget_aura_; | 126 DesktopNativeWidgetAura* desktop_native_widget_aura_; |
| 122 | 127 |
| 123 // State to restore window to when exiting fullscreen. Only valid if | 128 // State to restore window to when exiting fullscreen. Only valid if |
| 124 // fullscreen. | 129 // fullscreen. |
| 125 ui::WindowShowState fullscreen_restore_state_; | 130 ui::WindowShowState fullscreen_restore_state_; |
| 126 | 131 |
| 127 // We can optionally have a parent which can order us to close, or own | 132 // We can optionally have a parent which can order us to close, or own |
| 128 // children who we're responsible for closing when we CloseNow(). | 133 // children who we're responsible for closing when we CloseNow(). |
| 129 DesktopWindowTreeHostMus* parent_ = nullptr; | 134 DesktopWindowTreeHostMus* parent_ = nullptr; |
| 130 std::set<DesktopWindowTreeHostMus*> children_; | 135 std::set<DesktopWindowTreeHostMus*> children_; |
| 131 | 136 |
| 132 bool is_active_ = false; | 137 bool is_active_ = false; |
| 133 | 138 |
| 139 std::unique_ptr<wm::CursorManager> cursor_manager_; |
| 140 |
| 134 // Used so that Close() isn't immediate. | 141 // Used so that Close() isn't immediate. |
| 135 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; | 142 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; |
| 136 | 143 |
| 137 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); | 144 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); |
| 138 }; | 145 }; |
| 139 | 146 |
| 140 } // namespace views | 147 } // namespace views |
| 141 | 148 |
| 142 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ | 149 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ |
| OLD | NEW |