| 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 #include "ui/views/widget/widget_observer.h" |
| 18 | 19 |
| 19 namespace wm { | 20 namespace wm { |
| 20 class CursorManager; | 21 class CursorManager; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace views { | 24 namespace views { |
| 24 | 25 |
| 25 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus | 26 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus |
| 26 : public DesktopWindowTreeHost, | 27 : public DesktopWindowTreeHost, |
| 27 public MusClientObserver, | 28 public MusClientObserver, |
| 29 public WidgetObserver, |
| 28 public aura::WindowTreeHostMus, | 30 public aura::WindowTreeHostMus, |
| 29 public aura::EnvObserver { | 31 public aura::EnvObserver { |
| 30 public: | 32 public: |
| 31 DesktopWindowTreeHostMus( | 33 DesktopWindowTreeHostMus( |
| 32 internal::NativeWidgetDelegate* native_widget_delegate, | 34 internal::NativeWidgetDelegate* native_widget_delegate, |
| 33 DesktopNativeWidgetAura* desktop_native_widget_aura, | 35 DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 34 const std::map<std::string, std::vector<uint8_t>>* mus_properties); | 36 const std::map<std::string, std::vector<uint8_t>>* mus_properties); |
| 35 ~DesktopWindowTreeHostMus() override; | 37 ~DesktopWindowTreeHostMus() override; |
| 36 | 38 |
| 37 // Called when the window was deleted on the server. | 39 // Called when the window was deleted on the server. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 53 | 55 |
| 54 void SetBoundsInDIP(const gfx::Rect& bounds_in_dip); | 56 void SetBoundsInDIP(const gfx::Rect& bounds_in_dip); |
| 55 | 57 |
| 56 // Returns true if the client area should be set on this. | 58 // Returns true if the client area should be set on this. |
| 57 bool ShouldSendClientAreaToServer() const; | 59 bool ShouldSendClientAreaToServer() const; |
| 58 | 60 |
| 59 // DesktopWindowTreeHost: | 61 // DesktopWindowTreeHost: |
| 60 void Init(aura::Window* content_window, | 62 void Init(aura::Window* content_window, |
| 61 const Widget::InitParams& params) override; | 63 const Widget::InitParams& params) override; |
| 62 void OnNativeWidgetCreated(const Widget::InitParams& params) override; | 64 void OnNativeWidgetCreated(const Widget::InitParams& params) override; |
| 65 void OnNativeWidgetActivationChanged(bool active) override; |
| 63 void OnWidgetInitDone() override; | 66 void OnWidgetInitDone() override; |
| 64 std::unique_ptr<corewm::Tooltip> CreateTooltip() override; | 67 std::unique_ptr<corewm::Tooltip> CreateTooltip() override; |
| 65 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient( | 68 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient( |
| 66 DesktopNativeCursorManager* cursor_manager) override; | 69 DesktopNativeCursorManager* cursor_manager) override; |
| 67 void Close() override; | 70 void Close() override; |
| 68 void CloseNow() override; | 71 void CloseNow() override; |
| 69 aura::WindowTreeHost* AsWindowTreeHost() override; | 72 aura::WindowTreeHost* AsWindowTreeHost() override; |
| 70 void ShowWindowWithState(ui::WindowShowState state) override; | 73 void ShowWindowWithState(ui::WindowShowState state) override; |
| 71 void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override; | 74 void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override; |
| 72 bool IsVisible() const override; | 75 bool IsVisible() const override; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 void FlashFrame(bool flash_frame) override; | 119 void FlashFrame(bool flash_frame) override; |
| 117 bool IsAnimatingClosed() const override; | 120 bool IsAnimatingClosed() const override; |
| 118 bool IsTranslucentWindowOpacitySupported() const override; | 121 bool IsTranslucentWindowOpacitySupported() const override; |
| 119 void SizeConstraintsChanged() override; | 122 void SizeConstraintsChanged() override; |
| 120 bool ShouldUpdateWindowTransparency() const override; | 123 bool ShouldUpdateWindowTransparency() const override; |
| 121 bool ShouldUseDesktopNativeCursorManager() const override; | 124 bool ShouldUseDesktopNativeCursorManager() const override; |
| 122 | 125 |
| 123 // MusClientObserver: | 126 // MusClientObserver: |
| 124 void OnWindowManagerFrameValuesChanged() override; | 127 void OnWindowManagerFrameValuesChanged() override; |
| 125 | 128 |
| 129 // WidgetObserver: |
| 130 void OnWidgetActivationChanged(Widget* widget, bool active) override; |
| 131 |
| 126 // WindowTreeHostMus: | 132 // WindowTreeHostMus: |
| 127 void ShowImpl() override; | 133 void ShowImpl() override; |
| 128 void HideImpl() override; | 134 void HideImpl() override; |
| 129 void SetBoundsInPixels(const gfx::Rect& bounds_in_pixels) override; | 135 void SetBoundsInPixels(const gfx::Rect& bounds_in_pixels) override; |
| 130 | 136 |
| 131 // aura::EnvObserver: | 137 // aura::EnvObserver: |
| 132 void OnWindowInitialized(aura::Window* window) override; | 138 void OnWindowInitialized(aura::Window* window) override; |
| 133 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, | 139 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, |
| 134 aura::Window* window) override; | 140 aura::Window* window) override; |
| 135 | 141 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 154 | 160 |
| 155 // Used so that Close() isn't immediate. | 161 // Used so that Close() isn't immediate. |
| 156 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; | 162 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; |
| 157 | 163 |
| 158 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); | 164 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); |
| 159 }; | 165 }; |
| 160 | 166 |
| 161 } // namespace views | 167 } // namespace views |
| 162 | 168 |
| 163 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ | 169 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ |
| OLD | NEW |