| 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_MUS_MUS_CLIENT_H_ | 5 #ifndef UI_VIEWS_MUS_MUS_CLIENT_H_ |
| 6 #define UI_VIEWS_MUS_MUS_CLIENT_H_ | 6 #define UI_VIEWS_MUS_MUS_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 namespace service_manager { | 37 namespace service_manager { |
| 38 class Connector; | 38 class Connector; |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace wm { | 41 namespace wm { |
| 42 class WMState; | 42 class WMState; |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace views { | 45 namespace views { |
| 46 | 46 |
| 47 class DesktopNativeWidgetAura; |
| 47 class MusClientObserver; | 48 class MusClientObserver; |
| 48 class MusPropertyMirror; | 49 class MusPropertyMirror; |
| 49 class PointerWatcherEventRouter; | 50 class PointerWatcherEventRouter; |
| 50 class ScreenMus; | 51 class ScreenMus; |
| 51 | 52 |
| 52 namespace internal { | 53 namespace internal { |
| 53 class NativeWidgetDelegate; | 54 class NativeWidgetDelegate; |
| 54 } | 55 } |
| 55 | 56 |
| 56 namespace test { | 57 namespace test { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 92 |
| 92 PointerWatcherEventRouter* pointer_watcher_event_router() { | 93 PointerWatcherEventRouter* pointer_watcher_event_router() { |
| 93 return pointer_watcher_event_router_.get(); | 94 return pointer_watcher_event_router_.get(); |
| 94 } | 95 } |
| 95 | 96 |
| 96 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is | 97 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is |
| 97 // set as the factory function used for creating NativeWidgets when a | 98 // set as the factory function used for creating NativeWidgets when a |
| 98 // NativeWidget has not been explicitly set. | 99 // NativeWidget has not been explicitly set. |
| 99 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, | 100 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, |
| 100 internal::NativeWidgetDelegate* delegate); | 101 internal::NativeWidgetDelegate* delegate); |
| 101 | |
| 102 // Called when the capture client has been set for a window to notify | 102 // Called when the capture client has been set for a window to notify |
| 103 // PointerWatcherEventRouter and CaptureSynchronizer. | 103 // PointerWatcherEventRouter and CaptureSynchronizer. |
| 104 void OnCaptureClientSet(aura::client::CaptureClient* capture_client); | 104 void OnCaptureClientSet(aura::client::CaptureClient* capture_client); |
| 105 | 105 |
| 106 // Called when the capture client will be unset for a window to notify | 106 // Called when the capture client will be unset for a window to notify |
| 107 // PointerWatcherEventRouter and CaptureSynchronizer. | 107 // PointerWatcherEventRouter and CaptureSynchronizer. |
| 108 void OnCaptureClientUnset(aura::client::CaptureClient* capture_client); | 108 void OnCaptureClientUnset(aura::client::CaptureClient* capture_client); |
| 109 | 109 |
| 110 void AddObserver(MusClientObserver* observer); | 110 void AddObserver(MusClientObserver* observer); |
| 111 void RemoveObserver(MusClientObserver* observer); | 111 void RemoveObserver(MusClientObserver* observer); |
| 112 | 112 |
| 113 void SetMusPropertyMirror(std::unique_ptr<MusPropertyMirror> mirror); | 113 void SetMusPropertyMirror(std::unique_ptr<MusPropertyMirror> mirror); |
| 114 MusPropertyMirror* mus_property_mirror() { | 114 MusPropertyMirror* mus_property_mirror() { |
| 115 return mus_property_mirror_.get(); | 115 return mus_property_mirror_.get(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 friend class AuraInit; | 119 friend class AuraInit; |
| 120 friend class test::MusClientTestApi; | 120 friend class test::MusClientTestApi; |
| 121 | 121 |
| 122 // Creates a DesktopWindowTreeHostMus. This is set as the factory function |
| 123 // ViewsDelegate such that if DesktopNativeWidgetAura is created without a |
| 124 // DesktopWindowTreeHost this is created. |
| 125 std::unique_ptr<DesktopWindowTreeHost> CreateDesktopWindowTreeHost( |
| 126 const Widget::InitParams& init_params, |
| 127 internal::NativeWidgetDelegate* delegate, |
| 128 DesktopNativeWidgetAura* desktop_native_widget_aura); |
| 129 |
| 122 // aura::WindowTreeClientDelegate: | 130 // aura::WindowTreeClientDelegate: |
| 123 void OnEmbed( | 131 void OnEmbed( |
| 124 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; | 132 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; |
| 125 void OnLostConnection(aura::WindowTreeClient* client) override; | 133 void OnLostConnection(aura::WindowTreeClient* client) override; |
| 126 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override; | 134 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override; |
| 127 void OnPointerEventObserved(const ui::PointerEvent& event, | 135 void OnPointerEventObserved(const ui::PointerEvent& event, |
| 128 aura::Window* target) override; | 136 aura::Window* target) override; |
| 129 aura::PropertyConverter* GetPropertyConverter() override; | 137 aura::PropertyConverter* GetPropertyConverter() override; |
| 130 | 138 |
| 131 // ScreenMusDelegate: | 139 // ScreenMusDelegate: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 155 | 163 |
| 156 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> | 164 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> |
| 157 discardable_shared_memory_manager_; | 165 discardable_shared_memory_manager_; |
| 158 | 166 |
| 159 DISALLOW_COPY_AND_ASSIGN(MusClient); | 167 DISALLOW_COPY_AND_ASSIGN(MusClient); |
| 160 }; | 168 }; |
| 161 | 169 |
| 162 } // namespace views | 170 } // namespace views |
| 163 | 171 |
| 164 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ | 172 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ |
| OLD | NEW |