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/shell/public/cpp/connection.h" | |
21 #include "services/shell/public/cpp/interface_factory.h" | 20 #include "services/shell/public/cpp/interface_factory.h" |
| 21 #include "services/shell/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/events/ozone/device/device_manager.h" | 23 #include "ui/events/ozone/device/device_manager.h" |
24 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 24 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
25 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 25 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
26 #include "ui/ozone/platform/drm/common/drm_util.h" | 26 #include "ui/ozone/platform/drm/common/drm_util.h" |
27 #include "ui/ozone/platform/drm/cursor_proxy_mojo.h" | 27 #include "ui/ozone/platform/drm/cursor_proxy_mojo.h" |
28 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" | 28 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" |
29 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" | 29 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" |
30 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h" | 30 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h" |
31 #include "ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h" | 31 #include "ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 GpuPlatformSupport* GetGpuPlatformSupport() override { | 103 GpuPlatformSupport* GetGpuPlatformSupport() override { |
104 return gpu_platform_support_.get(); | 104 return gpu_platform_support_.get(); |
105 } | 105 } |
106 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { | 106 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { |
107 return gpu_platform_support_host_.get(); | 107 return gpu_platform_support_host_.get(); |
108 } | 108 } |
109 std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() override { | 109 std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() override { |
110 return event_factory_ozone_->CreateSystemInputInjector(); | 110 return event_factory_ozone_->CreateSystemInputInjector(); |
111 } | 111 } |
112 void AddInterfaces(shell::Connection* connection) override { | 112 void AddInterfaces(shell::InterfaceRegistry* registry) override { |
113 connection->AddInterface<ozone::mojom::DeviceCursor>(this); | 113 registry->AddInterface<ozone::mojom::DeviceCursor>(this); |
114 } | 114 } |
115 // shell::InterfaceFactory<mojom::ozone::Cursor> implementation. | 115 // shell::InterfaceFactory<mojom::ozone::Cursor> implementation. |
116 void Create(const shell::Identity& remote_identity, | 116 void Create(const shell::Identity& remote_identity, |
117 ozone::mojom::DeviceCursorRequest request) override { | 117 ozone::mojom::DeviceCursorRequest request) override { |
118 DCHECK(drm_thread_); | 118 DCHECK(drm_thread_); |
119 drm_thread_->AddBinding(std::move(request)); | 119 drm_thread_->AddBinding(std::move(request)); |
120 } | 120 } |
121 std::unique_ptr<PlatformWindow> CreatePlatformWindow( | 121 std::unique_ptr<PlatformWindow> CreatePlatformWindow( |
122 PlatformWindowDelegate* delegate, | 122 PlatformWindowDelegate* delegate, |
123 const gfx::Rect& bounds) override { | 123 const gfx::Rect& bounds) override { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); | 270 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); |
271 }; | 271 }; |
272 | 272 |
273 } // namespace | 273 } // namespace |
274 | 274 |
275 OzonePlatform* CreateOzonePlatformGbm() { | 275 OzonePlatform* CreateOzonePlatformGbm() { |
276 return new OzonePlatformGbm; | 276 return new OzonePlatformGbm; |
277 } | 277 } |
278 | 278 |
279 } // namespace ui | 279 } // namespace ui |
OLD | NEW |