| 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 ui { | 37 namespace ui { |
| 38 class GpuService; | 38 class GpuService; |
| 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 MusClientObserver; |
| 47 class PointerWatcherEventRouter2; | 48 class PointerWatcherEventRouter2; |
| 48 class ScreenMus; | 49 class ScreenMus; |
| 49 | 50 |
| 50 namespace internal { | 51 namespace internal { |
| 51 class NativeWidgetDelegate; | 52 class NativeWidgetDelegate; |
| 52 } | 53 } |
| 53 | 54 |
| 54 namespace test { | 55 namespace test { |
| 55 class MusClientTestApi; | 56 class MusClientTestApi; |
| 56 } | 57 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 PointerWatcherEventRouter2* pointer_watcher_event_router() { | 89 PointerWatcherEventRouter2* pointer_watcher_event_router() { |
| 89 return pointer_watcher_event_router_.get(); | 90 return pointer_watcher_event_router_.get(); |
| 90 } | 91 } |
| 91 | 92 |
| 92 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is | 93 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is |
| 93 // set as the factory function used for creating NativeWidgets when a | 94 // set as the factory function used for creating NativeWidgets when a |
| 94 // NativeWidget has not been explicitly set. | 95 // NativeWidget has not been explicitly set. |
| 95 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, | 96 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, |
| 96 internal::NativeWidgetDelegate* delegate); | 97 internal::NativeWidgetDelegate* delegate); |
| 97 | 98 |
| 99 void AddObserver(MusClientObserver* observer); |
| 100 void RemoveObserver(MusClientObserver* observer); |
| 101 |
| 98 private: | 102 private: |
| 99 friend class AuraInit; | 103 friend class AuraInit; |
| 100 friend class test::MusClientTestApi; | 104 friend class test::MusClientTestApi; |
| 101 | 105 |
| 102 MusClient( | 106 MusClient( |
| 103 service_manager::Connector* connector, | 107 service_manager::Connector* connector, |
| 104 const service_manager::Identity& identity, | 108 const service_manager::Identity& identity, |
| 105 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr); | 109 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr); |
| 106 | 110 |
| 107 // aura::WindowTreeClientDelegate: | 111 // aura::WindowTreeClientDelegate: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 120 aura::Window* GetWindowAtScreenPoint(const gfx::Point& point) override; | 124 aura::Window* GetWindowAtScreenPoint(const gfx::Point& point) override; |
| 121 | 125 |
| 122 // ui:OSExchangeDataProviderFactory::Factory: | 126 // ui:OSExchangeDataProviderFactory::Factory: |
| 123 std::unique_ptr<OSExchangeData::Provider> BuildProvider() override; | 127 std::unique_ptr<OSExchangeData::Provider> BuildProvider() override; |
| 124 | 128 |
| 125 static MusClient* instance_; | 129 static MusClient* instance_; |
| 126 | 130 |
| 127 service_manager::Connector* connector_; | 131 service_manager::Connector* connector_; |
| 128 service_manager::Identity identity_; | 132 service_manager::Identity identity_; |
| 129 | 133 |
| 134 base::ObserverList<MusClientObserver> observer_list_; |
| 135 |
| 130 std::unique_ptr<wm::WMState> wm_state_; | 136 std::unique_ptr<wm::WMState> wm_state_; |
| 131 | 137 |
| 132 std::unique_ptr<ScreenMus> screen_; | 138 std::unique_ptr<ScreenMus> screen_; |
| 133 | 139 |
| 134 std::unique_ptr<aura::PropertyConverter> property_converter_; | 140 std::unique_ptr<aura::PropertyConverter> property_converter_; |
| 135 | 141 |
| 136 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; | 142 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; |
| 137 | 143 |
| 138 std::unique_ptr<ui::GpuService> gpu_service_; | 144 std::unique_ptr<ui::GpuService> gpu_service_; |
| 139 | 145 |
| 140 std::unique_ptr<PointerWatcherEventRouter2> pointer_watcher_event_router_; | 146 std::unique_ptr<PointerWatcherEventRouter2> pointer_watcher_event_router_; |
| 141 | 147 |
| 142 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; | 148 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; |
| 143 | 149 |
| 144 DISALLOW_COPY_AND_ASSIGN(MusClient); | 150 DISALLOW_COPY_AND_ASSIGN(MusClient); |
| 145 }; | 151 }; |
| 146 | 152 |
| 147 } // namespace views | 153 } // namespace views |
| 148 | 154 |
| 149 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ | 155 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ |
| OLD | NEW |