| 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/aura/window_observer.h" |
| 14 #include "ui/views/mus/mus_client_observer.h" | 15 #include "ui/views/mus/mus_client_observer.h" |
| 15 #include "ui/views/mus/mus_export.h" | 16 #include "ui/views/mus/mus_export.h" |
| 16 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" | 17 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" |
| 17 #include "ui/views/widget/widget.h" | 18 #include "ui/views/widget/widget.h" |
| 18 #include "ui/views/widget/widget_observer.h" | 19 #include "ui/views/widget/widget_observer.h" |
| 19 | 20 |
| 20 namespace wm { | 21 namespace wm { |
| 21 class CursorManager; | 22 class CursorManager; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace views { | 25 namespace views { |
| 25 | 26 |
| 26 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus | 27 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus |
| 27 : public DesktopWindowTreeHost, | 28 : public DesktopWindowTreeHost, |
| 28 public MusClientObserver, | 29 public MusClientObserver, |
| 29 public WidgetObserver, | 30 public WidgetObserver, |
| 31 public aura::WindowObserver, |
| 30 public aura::WindowTreeHostMus, | 32 public aura::WindowTreeHostMus, |
| 31 public aura::EnvObserver { | 33 public aura::EnvObserver { |
| 32 public: | 34 public: |
| 33 DesktopWindowTreeHostMus( | 35 DesktopWindowTreeHostMus( |
| 34 internal::NativeWidgetDelegate* native_widget_delegate, | 36 internal::NativeWidgetDelegate* native_widget_delegate, |
| 35 DesktopNativeWidgetAura* desktop_native_widget_aura, | 37 DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 36 const std::map<std::string, std::vector<uint8_t>>* mus_properties); | 38 const std::map<std::string, std::vector<uint8_t>>* mus_properties); |
| 37 ~DesktopWindowTreeHostMus() override; | 39 ~DesktopWindowTreeHostMus() override; |
| 38 | 40 |
| 39 // Called when the window was deleted on the server. | 41 // Called when the window was deleted on the server. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 void InitModalType(ui::ModalType modal_type) override; | 120 void InitModalType(ui::ModalType modal_type) override; |
| 119 void FlashFrame(bool flash_frame) override; | 121 void FlashFrame(bool flash_frame) override; |
| 120 bool IsAnimatingClosed() const override; | 122 bool IsAnimatingClosed() const override; |
| 121 bool IsTranslucentWindowOpacitySupported() const override; | 123 bool IsTranslucentWindowOpacitySupported() const override; |
| 122 void SizeConstraintsChanged() override; | 124 void SizeConstraintsChanged() override; |
| 123 bool ShouldUpdateWindowTransparency() const override; | 125 bool ShouldUpdateWindowTransparency() const override; |
| 124 bool ShouldUseDesktopNativeCursorManager() const override; | 126 bool ShouldUseDesktopNativeCursorManager() const override; |
| 125 | 127 |
| 126 // MusClientObserver: | 128 // MusClientObserver: |
| 127 void OnWindowManagerFrameValuesChanged() override; | 129 void OnWindowManagerFrameValuesChanged() override; |
| 130 void OnWindowPropertyChanged(aura::Window* window, const void* key) override; |
| 128 | 131 |
| 129 // WidgetObserver: | 132 // WidgetObserver: |
| 130 void OnWidgetActivationChanged(Widget* widget, bool active) override; | 133 void OnWidgetActivationChanged(Widget* widget, bool active) override; |
| 131 | 134 |
| 132 // WindowTreeHostMus: | 135 // aura::WindowObserver: |
| 136 void OnWindowPropertyChanged(aura::Window* window, |
| 137 const void* key, |
| 138 intptr_t old) override; |
| 139 |
| 140 // aura::WindowTreeHostMus: |
| 133 void ShowImpl() override; | 141 void ShowImpl() override; |
| 134 void HideImpl() override; | 142 void HideImpl() override; |
| 135 void SetBoundsInPixels(const gfx::Rect& bounds_in_pixels) override; | 143 void SetBoundsInPixels(const gfx::Rect& bounds_in_pixels) override; |
| 136 | 144 |
| 137 // aura::EnvObserver: | 145 // aura::EnvObserver: |
| 138 void OnWindowInitialized(aura::Window* window) override; | 146 void OnWindowInitialized(aura::Window* window) override; |
| 139 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, | 147 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, |
| 140 aura::Window* window) override; | 148 aura::Window* window) override; |
| 141 | 149 |
| 142 internal::NativeWidgetDelegate* native_widget_delegate_; | 150 internal::NativeWidgetDelegate* native_widget_delegate_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 160 | 168 |
| 161 // Used so that Close() isn't immediate. | 169 // Used so that Close() isn't immediate. |
| 162 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; | 170 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; |
| 163 | 171 |
| 164 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); | 172 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); |
| 165 }; | 173 }; |
| 166 | 174 |
| 167 } // namespace views | 175 } // namespace views |
| 168 | 176 |
| 169 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ | 177 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ |
| OLD | NEW |