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