| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 namespace ui { | 33 namespace ui { |
| 34 class GpuService; | 34 class GpuService; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace wm { | 37 namespace wm { |
| 38 class WMState; | 38 class WMState; |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace views { | 41 namespace views { |
| 42 | 42 |
| 43 class MusClientObserver; |
| 43 class ScreenMus; | 44 class ScreenMus; |
| 44 | 45 |
| 45 namespace internal { | 46 namespace internal { |
| 46 class NativeWidgetDelegate; | 47 class NativeWidgetDelegate; |
| 47 } | 48 } |
| 48 | 49 |
| 49 namespace test { | 50 namespace test { |
| 50 class MusClientTestApi; | 51 class MusClientTestApi; |
| 51 } | 52 } |
| 52 | 53 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 75 aura::WindowTreeClient* window_tree_client() { | 76 aura::WindowTreeClient* window_tree_client() { |
| 76 return window_tree_client_.get(); | 77 return window_tree_client_.get(); |
| 77 } | 78 } |
| 78 | 79 |
| 79 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is | 80 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is |
| 80 // set as the factory function used for creating NativeWidgets when a | 81 // set as the factory function used for creating NativeWidgets when a |
| 81 // NativeWidget has not been explicitly set. | 82 // NativeWidget has not been explicitly set. |
| 82 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, | 83 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, |
| 83 internal::NativeWidgetDelegate* delegate); | 84 internal::NativeWidgetDelegate* delegate); |
| 84 | 85 |
| 86 void AddObserver(MusClientObserver* observer); |
| 87 void RemoveObserver(MusClientObserver* observer); |
| 88 |
| 85 private: | 89 private: |
| 86 friend class AuraInit; | 90 friend class AuraInit; |
| 87 friend class test::MusClientTestApi; | 91 friend class test::MusClientTestApi; |
| 88 | 92 |
| 89 MusClient( | 93 MusClient( |
| 90 service_manager::Connector* connector, | 94 service_manager::Connector* connector, |
| 91 const service_manager::Identity& identity, | 95 const service_manager::Identity& identity, |
| 92 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr); | 96 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr); |
| 93 | 97 |
| 94 // aura::WindowTreeClientDelegate: | 98 // aura::WindowTreeClientDelegate: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 107 aura::Window* GetWindowAtScreenPoint(const gfx::Point& point) override; | 111 aura::Window* GetWindowAtScreenPoint(const gfx::Point& point) override; |
| 108 | 112 |
| 109 // ui:OSExchangeDataProviderFactory::Factory: | 113 // ui:OSExchangeDataProviderFactory::Factory: |
| 110 std::unique_ptr<OSExchangeData::Provider> BuildProvider() override; | 114 std::unique_ptr<OSExchangeData::Provider> BuildProvider() override; |
| 111 | 115 |
| 112 static MusClient* instance_; | 116 static MusClient* instance_; |
| 113 | 117 |
| 114 service_manager::Connector* connector_; | 118 service_manager::Connector* connector_; |
| 115 service_manager::Identity identity_; | 119 service_manager::Identity identity_; |
| 116 | 120 |
| 121 base::ObserverList<MusClientObserver> observer_list_; |
| 122 |
| 117 std::unique_ptr<wm::WMState> wm_state_; | 123 std::unique_ptr<wm::WMState> wm_state_; |
| 118 | 124 |
| 119 std::unique_ptr<ScreenMus> screen_; | 125 std::unique_ptr<ScreenMus> screen_; |
| 120 | 126 |
| 121 std::unique_ptr<aura::PropertyConverter> property_converter_; | 127 std::unique_ptr<aura::PropertyConverter> property_converter_; |
| 122 | 128 |
| 123 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; | 129 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; |
| 124 | 130 |
| 125 std::unique_ptr<ui::GpuService> gpu_service_; | 131 std::unique_ptr<ui::GpuService> gpu_service_; |
| 126 | 132 |
| 127 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; | 133 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; |
| 128 | 134 |
| 129 DISALLOW_COPY_AND_ASSIGN(MusClient); | 135 DISALLOW_COPY_AND_ASSIGN(MusClient); |
| 130 }; | 136 }; |
| 131 | 137 |
| 132 } // namespace views | 138 } // namespace views |
| 133 | 139 |
| 134 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ | 140 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ |
| OLD | NEW |