| 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_INIT_H_ | 5 #ifndef UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ |
| 6 #define UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ | 6 #define UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // AuraInit::Mode::AURA to AuraInit and MusClient will be created for us. | 55 // AuraInit::Mode::AURA to AuraInit and MusClient will be created for us. |
| 56 class VIEWS_MUS_EXPORT MusClient | 56 class VIEWS_MUS_EXPORT MusClient |
| 57 : public aura::WindowTreeClientDelegate, | 57 : public aura::WindowTreeClientDelegate, |
| 58 public ScreenMusDelegate, | 58 public ScreenMusDelegate, |
| 59 public ui::OSExchangeDataProviderFactory::Factory { | 59 public ui::OSExchangeDataProviderFactory::Factory { |
| 60 public: | 60 public: |
| 61 ~MusClient() override; | 61 ~MusClient() override; |
| 62 | 62 |
| 63 static MusClient* Get() { return instance_; } | 63 static MusClient* Get() { return instance_; } |
| 64 | 64 |
| 65 // Returns true if a DesktopNativeWidgetAura should be created given the |
| 66 // specified params. If this returns false a NativeWidgetAura should be |
| 67 // created. |
| 68 static bool ShouldCreateDesktopNativeWidgetAura( |
| 69 const Widget::InitParams& init_params); |
| 70 |
| 65 service_manager::Connector* connector() { return connector_; } | 71 service_manager::Connector* connector() { return connector_; } |
| 66 | 72 |
| 67 aura::WindowTreeClient* window_tree_client() { | 73 aura::WindowTreeClient* window_tree_client() { |
| 68 return window_tree_client_.get(); | 74 return window_tree_client_.get(); |
| 69 } | 75 } |
| 70 | 76 |
| 71 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is | 77 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is |
| 72 // set as the factory function used for creating NativeWidgets when a | 78 // set as the factory function used for creating NativeWidgets when a |
| 73 // NativeWidget has not been explicitly set. | 79 // NativeWidget has not been explicitly set. |
| 74 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, | 80 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 std::unique_ptr<aura::GpuService> gpu_service_; | 123 std::unique_ptr<aura::GpuService> gpu_service_; |
| 118 | 124 |
| 119 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; | 125 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; |
| 120 | 126 |
| 121 DISALLOW_COPY_AND_ASSIGN(MusClient); | 127 DISALLOW_COPY_AND_ASSIGN(MusClient); |
| 122 }; | 128 }; |
| 123 | 129 |
| 124 } // namespace views | 130 } // namespace views |
| 125 | 131 |
| 126 #endif // UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ | 132 #endif // UI_VIEWS_MUS_MUS_CLIENT_INIT_H_ |
| OLD | NEW |