| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_MUS_MUS_APP_H_ | 5 #ifndef COMPONENTS_MUS_MUS_APP_H_ |
| 6 #define COMPONENTS_MUS_MUS_APP_H_ | 6 #define COMPONENTS_MUS_MUS_APP_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "components/mus/public/interfaces/clipboard.mojom.h" | 16 #include "components/mus/public/interfaces/clipboard.mojom.h" |
| 17 #include "components/mus/public/interfaces/display.mojom.h" | 17 #include "components/mus/public/interfaces/display.mojom.h" |
| 18 #include "components/mus/public/interfaces/gpu.mojom.h" | 18 #include "components/mus/public/interfaces/gpu.mojom.h" |
| 19 #include "components/mus/public/interfaces/gpu_service.mojom.h" |
| 19 #include "components/mus/public/interfaces/user_access_manager.mojom.h" | 20 #include "components/mus/public/interfaces/user_access_manager.mojom.h" |
| 20 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" | 21 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" |
| 21 #include "components/mus/public/interfaces/window_server_test.mojom.h" | 22 #include "components/mus/public/interfaces/window_server_test.mojom.h" |
| 22 #include "components/mus/public/interfaces/window_tree.mojom.h" | 23 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 23 #include "components/mus/public/interfaces/window_tree_host.mojom.h" | 24 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
| 24 #include "components/mus/ws/platform_display_init_params.h" | 25 #include "components/mus/ws/platform_display_init_params.h" |
| 25 #include "components/mus/ws/user_id.h" | 26 #include "components/mus/ws/user_id.h" |
| 26 #include "components/mus/ws/window_server_delegate.h" | 27 #include "components/mus/ws/window_server_delegate.h" |
| 27 #include "services/shell/public/cpp/application_runner.h" | 28 #include "services/shell/public/cpp/application_runner.h" |
| 28 #include "services/shell/public/cpp/interface_factory.h" | 29 #include "services/shell/public/cpp/interface_factory.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 51 class PlatformScreen; | 52 class PlatformScreen; |
| 52 class WindowServer; | 53 class WindowServer; |
| 53 } | 54 } |
| 54 | 55 |
| 55 class MusApp | 56 class MusApp |
| 56 : public shell::ShellClient, | 57 : public shell::ShellClient, |
| 57 public ws::WindowServerDelegate, | 58 public ws::WindowServerDelegate, |
| 58 public shell::InterfaceFactory<mojom::Clipboard>, | 59 public shell::InterfaceFactory<mojom::Clipboard>, |
| 59 public shell::InterfaceFactory<mojom::DisplayManager>, | 60 public shell::InterfaceFactory<mojom::DisplayManager>, |
| 60 public shell::InterfaceFactory<mojom::Gpu>, | 61 public shell::InterfaceFactory<mojom::Gpu>, |
| 62 public shell::InterfaceFactory<mojom::GpuService>, |
| 61 public shell::InterfaceFactory<mojom::UserAccessManager>, | 63 public shell::InterfaceFactory<mojom::UserAccessManager>, |
| 62 public shell::InterfaceFactory<mojom::WindowManagerFactoryService>, | 64 public shell::InterfaceFactory<mojom::WindowManagerFactoryService>, |
| 63 public shell::InterfaceFactory<mojom::WindowTreeFactory>, | 65 public shell::InterfaceFactory<mojom::WindowTreeFactory>, |
| 64 public shell::InterfaceFactory<mojom::WindowTreeHostFactory>, | 66 public shell::InterfaceFactory<mojom::WindowTreeHostFactory>, |
| 65 public shell::InterfaceFactory<mojom::WindowServerTest> { | 67 public shell::InterfaceFactory<mojom::WindowServerTest> { |
| 66 public: | 68 public: |
| 67 MusApp(); | 69 MusApp(); |
| 68 ~MusApp() override; | 70 ~MusApp() override; |
| 69 | 71 |
| 70 private: | 72 private: |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 mojom::ClipboardRequest request) override; | 104 mojom::ClipboardRequest request) override; |
| 103 | 105 |
| 104 // shell::InterfaceFactory<mojom::DisplayManager> implementation. | 106 // shell::InterfaceFactory<mojom::DisplayManager> implementation. |
| 105 void Create(shell::Connection* connection, | 107 void Create(shell::Connection* connection, |
| 106 mojom::DisplayManagerRequest request) override; | 108 mojom::DisplayManagerRequest request) override; |
| 107 | 109 |
| 108 // shell::InterfaceFactory<mojom::Gpu> implementation. | 110 // shell::InterfaceFactory<mojom::Gpu> implementation. |
| 109 void Create(shell::Connection* connection, | 111 void Create(shell::Connection* connection, |
| 110 mojom::GpuRequest request) override; | 112 mojom::GpuRequest request) override; |
| 111 | 113 |
| 114 // shell::InterfaceFactory<mojom::GpuService> implementation. |
| 115 void Create(shell::Connection* connection, |
| 116 mojom::GpuServiceRequest request) override; |
| 117 |
| 112 // shell::InterfaceFactory<mojom::UserAccessManager> implementation. | 118 // shell::InterfaceFactory<mojom::UserAccessManager> implementation. |
| 113 void Create(shell::Connection* connection, | 119 void Create(shell::Connection* connection, |
| 114 mojom::UserAccessManagerRequest request) override; | 120 mojom::UserAccessManagerRequest request) override; |
| 115 | 121 |
| 116 // shell::InterfaceFactory<mojom::WindowManagerFactoryService> implementation. | 122 // shell::InterfaceFactory<mojom::WindowManagerFactoryService> implementation. |
| 117 void Create(shell::Connection* connection, | 123 void Create(shell::Connection* connection, |
| 118 mojom::WindowManagerFactoryServiceRequest request) override; | 124 mojom::WindowManagerFactoryServiceRequest request) override; |
| 119 | 125 |
| 120 // shell::InterfaceFactory<mojom::WindowTreeFactory>: | 126 // shell::InterfaceFactory<mojom::WindowTreeFactory>: |
| 121 void Create(shell::Connection* connection, | 127 void Create(shell::Connection* connection, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 138 ws::PlatformDisplayInitParams platform_display_init_params_; | 144 ws::PlatformDisplayInitParams platform_display_init_params_; |
| 139 std::unique_ptr<ws::WindowServer> window_server_; | 145 std::unique_ptr<ws::WindowServer> window_server_; |
| 140 std::unique_ptr<ui::PlatformEventSource> event_source_; | 146 std::unique_ptr<ui::PlatformEventSource> event_source_; |
| 141 mojo::TracingImpl tracing_; | 147 mojo::TracingImpl tracing_; |
| 142 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>; | 148 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>; |
| 143 PendingRequests pending_requests_; | 149 PendingRequests pending_requests_; |
| 144 | 150 |
| 145 UserIdToUserState user_id_to_user_state_; | 151 UserIdToUserState user_id_to_user_state_; |
| 146 | 152 |
| 147 bool test_config_; | 153 bool test_config_; |
| 154 bool use_chrome_gpu_command_buffer_; |
| 148 #if defined(USE_OZONE) | 155 #if defined(USE_OZONE) |
| 149 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; | 156 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; |
| 150 #endif | 157 #endif |
| 151 | 158 |
| 152 std::unique_ptr<ws::PlatformScreen> platform_screen_; | 159 std::unique_ptr<ws::PlatformScreen> platform_screen_; |
| 153 | 160 |
| 154 base::WeakPtrFactory<MusApp> weak_ptr_factory_; | 161 base::WeakPtrFactory<MusApp> weak_ptr_factory_; |
| 155 | 162 |
| 156 DISALLOW_COPY_AND_ASSIGN(MusApp); | 163 DISALLOW_COPY_AND_ASSIGN(MusApp); |
| 157 }; | 164 }; |
| 158 | 165 |
| 159 } // namespace mus | 166 } // namespace mus |
| 160 | 167 |
| 161 #endif // COMPONENTS_MUS_MUS_APP_H_ | 168 #endif // COMPONENTS_MUS_MUS_APP_H_ |
| OLD | NEW |