| 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 SERVICES_UI_SERVICE_H_ | 5 #ifndef SERVICES_UI_SERVICE_H_ |
| 6 #define SERVICES_UI_SERVICE_H_ | 6 #define SERVICES_UI_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "services/shell/public/cpp/application_runner.h" | 17 #include "services/shell/public/cpp/application_runner.h" |
| 18 #include "services/shell/public/cpp/interface_factory.h" | 18 #include "services/shell/public/cpp/interface_factory.h" |
| 19 #include "services/shell/public/cpp/service.h" | 19 #include "services/shell/public/cpp/service.h" |
| 20 #include "services/tracing/public/cpp/tracing_impl.h" | 20 #include "services/tracing/public/cpp/tracing_impl.h" |
| 21 #include "services/ui/input_devices/input_device_server.h" | 21 #include "services/ui/input_devices/input_device_server.h" |
| 22 #include "services/ui/public/interfaces/accessibility_manager.mojom.h" |
| 22 #include "services/ui/public/interfaces/clipboard.mojom.h" | 23 #include "services/ui/public/interfaces/clipboard.mojom.h" |
| 23 #include "services/ui/public/interfaces/display.mojom.h" | 24 #include "services/ui/public/interfaces/display.mojom.h" |
| 24 #include "services/ui/public/interfaces/gpu.mojom.h" | 25 #include "services/ui/public/interfaces/gpu.mojom.h" |
| 25 #include "services/ui/public/interfaces/gpu_service.mojom.h" | 26 #include "services/ui/public/interfaces/gpu_service.mojom.h" |
| 26 #include "services/ui/public/interfaces/user_access_manager.mojom.h" | 27 #include "services/ui/public/interfaces/user_access_manager.mojom.h" |
| 27 #include "services/ui/public/interfaces/user_activity_monitor.mojom.h" | 28 #include "services/ui/public/interfaces/user_activity_monitor.mojom.h" |
| 28 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom
.h" | 29 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom
.h" |
| 29 #include "services/ui/public/interfaces/window_server_test.mojom.h" | 30 #include "services/ui/public/interfaces/window_server_test.mojom.h" |
| 30 #include "services/ui/public/interfaces/window_tree.mojom.h" | 31 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 31 #include "services/ui/public/interfaces/window_tree_host.mojom.h" | 32 #include "services/ui/public/interfaces/window_tree_host.mojom.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 53 namespace ui { | 54 namespace ui { |
| 54 namespace ws { | 55 namespace ws { |
| 55 class ForwardingWindowManager; | 56 class ForwardingWindowManager; |
| 56 class PlatformScreen; | 57 class PlatformScreen; |
| 57 class WindowServer; | 58 class WindowServer; |
| 58 } | 59 } |
| 59 | 60 |
| 60 class Service | 61 class Service |
| 61 : public shell::Service, | 62 : public shell::Service, |
| 62 public ws::WindowServerDelegate, | 63 public ws::WindowServerDelegate, |
| 64 public shell::InterfaceFactory<mojom::AccessibilityManager>, |
| 63 public shell::InterfaceFactory<mojom::Clipboard>, | 65 public shell::InterfaceFactory<mojom::Clipboard>, |
| 64 public shell::InterfaceFactory<mojom::DisplayManager>, | 66 public shell::InterfaceFactory<mojom::DisplayManager>, |
| 65 public shell::InterfaceFactory<mojom::Gpu>, | 67 public shell::InterfaceFactory<mojom::Gpu>, |
| 66 public shell::InterfaceFactory<mojom::GpuService>, | 68 public shell::InterfaceFactory<mojom::GpuService>, |
| 67 public shell::InterfaceFactory<mojom::UserAccessManager>, | 69 public shell::InterfaceFactory<mojom::UserAccessManager>, |
| 68 public shell::InterfaceFactory<mojom::UserActivityMonitor>, | 70 public shell::InterfaceFactory<mojom::UserActivityMonitor>, |
| 69 public shell::InterfaceFactory<mojom::WindowManagerWindowTreeFactory>, | 71 public shell::InterfaceFactory<mojom::WindowManagerWindowTreeFactory>, |
| 70 public shell::InterfaceFactory<mojom::WindowTreeFactory>, | 72 public shell::InterfaceFactory<mojom::WindowTreeFactory>, |
| 71 public shell::InterfaceFactory<mojom::WindowTreeHostFactory>, | 73 public shell::InterfaceFactory<mojom::WindowTreeHostFactory>, |
| 72 public shell::InterfaceFactory<mojom::WindowServerTest> { | 74 public shell::InterfaceFactory<mojom::WindowServerTest> { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 97 const shell::Identity& identity, | 99 const shell::Identity& identity, |
| 98 uint32_t id) override; | 100 uint32_t id) override; |
| 99 bool OnConnect(shell::Connection* connection) override; | 101 bool OnConnect(shell::Connection* connection) override; |
| 100 | 102 |
| 101 // WindowServerDelegate: | 103 // WindowServerDelegate: |
| 102 void OnFirstDisplayReady() override; | 104 void OnFirstDisplayReady() override; |
| 103 void OnNoMoreDisplays() override; | 105 void OnNoMoreDisplays() override; |
| 104 bool IsTestConfig() const override; | 106 bool IsTestConfig() const override; |
| 105 void CreateDefaultDisplays() override; | 107 void CreateDefaultDisplays() override; |
| 106 | 108 |
| 109 // shell::InterfaceFactory<mojom::AccessibilityManager> implementation. |
| 110 void Create(shell::Connection* connection, |
| 111 mojom::AccessibilityManagerRequest request) override; |
| 112 |
| 107 // shell::InterfaceFactory<mojom::Clipboard> implementation. | 113 // shell::InterfaceFactory<mojom::Clipboard> implementation. |
| 108 void Create(shell::Connection* connection, | 114 void Create(shell::Connection* connection, |
| 109 mojom::ClipboardRequest request) override; | 115 mojom::ClipboardRequest request) override; |
| 110 | 116 |
| 111 // shell::InterfaceFactory<mojom::DisplayManager> implementation. | 117 // shell::InterfaceFactory<mojom::DisplayManager> implementation. |
| 112 void Create(shell::Connection* connection, | 118 void Create(shell::Connection* connection, |
| 113 mojom::DisplayManagerRequest request) override; | 119 mojom::DisplayManagerRequest request) override; |
| 114 | 120 |
| 115 // shell::InterfaceFactory<mojom::Gpu> implementation. | 121 // shell::InterfaceFactory<mojom::Gpu> implementation. |
| 116 void Create(shell::Connection* connection, | 122 void Create(shell::Connection* connection, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 std::unique_ptr<ws::TouchController> touch_controller_; | 179 std::unique_ptr<ws::TouchController> touch_controller_; |
| 174 | 180 |
| 175 base::WeakPtrFactory<Service> weak_ptr_factory_; | 181 base::WeakPtrFactory<Service> weak_ptr_factory_; |
| 176 | 182 |
| 177 DISALLOW_COPY_AND_ASSIGN(Service); | 183 DISALLOW_COPY_AND_ASSIGN(Service); |
| 178 }; | 184 }; |
| 179 | 185 |
| 180 } // namespace ui | 186 } // namespace ui |
| 181 | 187 |
| 182 #endif // SERVICES_UI_SERVICE_H_ | 188 #endif // SERVICES_UI_SERVICE_H_ |
| OLD | NEW |