| 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> |
| 9 |
| 10 #include <map> |
| 8 #include <string> | 11 #include <string> |
| 12 #include <vector> |
| 9 | 13 |
| 10 #include "base/macros.h" | 14 #include "base/macros.h" |
| 11 #include "ui/aura/mus/window_tree_client_delegate.h" | 15 #include "ui/aura/mus/window_tree_client_delegate.h" |
| 12 #include "ui/base/dragdrop/os_exchange_data_provider_factory.h" | 16 #include "ui/base/dragdrop/os_exchange_data_provider_factory.h" |
| 13 #include "ui/views/mus/mus_export.h" | 17 #include "ui/views/mus/mus_export.h" |
| 14 #include "ui/views/mus/screen_mus_delegate.h" | 18 #include "ui/views/mus/screen_mus_delegate.h" |
| 15 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
| 16 | 20 |
| 17 namespace aura { | 21 namespace aura { |
| 18 class PropertyConverter; | 22 class PropertyConverter; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 ~MusClient() override; | 67 ~MusClient() override; |
| 64 | 68 |
| 65 static MusClient* Get() { return instance_; } | 69 static MusClient* Get() { return instance_; } |
| 66 | 70 |
| 67 // Returns true if a DesktopNativeWidgetAura should be created given the | 71 // Returns true if a DesktopNativeWidgetAura should be created given the |
| 68 // specified params. If this returns false a NativeWidgetAura should be | 72 // specified params. If this returns false a NativeWidgetAura should be |
| 69 // created. | 73 // created. |
| 70 static bool ShouldCreateDesktopNativeWidgetAura( | 74 static bool ShouldCreateDesktopNativeWidgetAura( |
| 71 const Widget::InitParams& init_params); | 75 const Widget::InitParams& init_params); |
| 72 | 76 |
| 77 // Returns the properties to supply to mus when creating a window. |
| 78 static std::map<std::string, std::vector<uint8_t>> |
| 79 ConfigurePropertiesFromParams(const Widget::InitParams& init_params); |
| 80 |
| 73 service_manager::Connector* connector() { return connector_; } | 81 service_manager::Connector* connector() { return connector_; } |
| 74 | 82 |
| 75 aura::WindowTreeClient* window_tree_client() { | 83 aura::WindowTreeClient* window_tree_client() { |
| 76 return window_tree_client_.get(); | 84 return window_tree_client_.get(); |
| 77 } | 85 } |
| 78 | 86 |
| 79 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is | 87 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is |
| 80 // set as the factory function used for creating NativeWidgets when a | 88 // set as the factory function used for creating NativeWidgets when a |
| 81 // NativeWidget has not been explicitly set. | 89 // NativeWidget has not been explicitly set. |
| 82 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, | 90 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 std::unique_ptr<ui::GpuService> gpu_service_; | 133 std::unique_ptr<ui::GpuService> gpu_service_; |
| 126 | 134 |
| 127 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; | 135 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; |
| 128 | 136 |
| 129 DISALLOW_COPY_AND_ASSIGN(MusClient); | 137 DISALLOW_COPY_AND_ASSIGN(MusClient); |
| 130 }; | 138 }; |
| 131 | 139 |
| 132 } // namespace views | 140 } // namespace views |
| 133 | 141 |
| 134 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ | 142 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ |
| OLD | NEW |