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 #include "ui/ozone/platform/drm/ozone_platform_gbm.h" | 5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <gbm.h> | 9 #include <gbm.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
11 #include <xf86drm.h> | 11 #include <xf86drm.h> |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include "base/bind.h" | 16 #include "base/bind.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ptr_util.h" | 19 #include "base/memory/ptr_util.h" |
| 20 #include "services/service_manager/public/cpp/binder_registry.h" |
20 #include "services/service_manager/public/cpp/interface_factory.h" | 21 #include "services/service_manager/public/cpp/interface_factory.h" |
21 #include "services/service_manager/public/cpp/interface_registry.h" | |
22 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" | 22 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" |
23 #include "ui/base/ui_features.h" | 23 #include "ui/base/ui_features.h" |
24 #include "ui/events/ozone/device/device_manager.h" | 24 #include "ui/events/ozone/device/device_manager.h" |
25 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 25 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
26 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 26 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
27 #include "ui/ozone/platform/drm/common/drm_util.h" | 27 #include "ui/ozone/platform/drm/common/drm_util.h" |
28 #include "ui/ozone/platform/drm/cursor_proxy_mojo.h" | 28 #include "ui/ozone/platform/drm/cursor_proxy_mojo.h" |
29 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" | 29 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" |
30 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" | 30 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" |
31 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h" | 31 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 IPC::MessageFilter* GetGpuMessageFilter() override { | 102 IPC::MessageFilter* GetGpuMessageFilter() override { |
103 return gpu_message_filter_.get(); | 103 return gpu_message_filter_.get(); |
104 } | 104 } |
105 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { | 105 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { |
106 return gpu_platform_support_host_.get(); | 106 return gpu_platform_support_host_.get(); |
107 } | 107 } |
108 std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() override { | 108 std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() override { |
109 return event_factory_ozone_->CreateSystemInputInjector(); | 109 return event_factory_ozone_->CreateSystemInputInjector(); |
110 } | 110 } |
111 void AddInterfaces(service_manager::InterfaceRegistry* registry) override { | 111 void AddInterfaces(service_manager::BinderRegistry* registry) override { |
112 registry->AddInterface<ozone::mojom::DeviceCursor>(this); | 112 registry->AddInterface<ozone::mojom::DeviceCursor>(this); |
113 } | 113 } |
114 // service_manager::InterfaceFactory<ozone::mojom::DeviceCursor>: | 114 // service_manager::InterfaceFactory<ozone::mojom::DeviceCursor>: |
115 void Create(const service_manager::Identity& remote_identity, | 115 void Create(const service_manager::Identity& remote_identity, |
116 ozone::mojom::DeviceCursorRequest request) override { | 116 ozone::mojom::DeviceCursorRequest request) override { |
117 if (drm_thread_proxy_) | 117 if (drm_thread_proxy_) |
118 drm_thread_proxy_->AddBinding(std::move(request)); | 118 drm_thread_proxy_->AddBinding(std::move(request)); |
119 else | 119 else |
120 pending_cursor_requests_.push_back(std::move(request)); | 120 pending_cursor_requests_.push_back(std::move(request)); |
121 } | 121 } |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); | 267 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); |
268 }; | 268 }; |
269 | 269 |
270 } // namespace | 270 } // namespace |
271 | 271 |
272 OzonePlatform* CreateOzonePlatformGbm() { | 272 OzonePlatform* CreateOzonePlatformGbm() { |
273 return new OzonePlatformGbm; | 273 return new OzonePlatformGbm; |
274 } | 274 } |
275 | 275 |
276 } // namespace ui | 276 } // namespace ui |
OLD | NEW |