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/dri/ozone_platform_gbm.h" | 5 #include "ui/ozone/platform/dri/ozone_platform_gbm.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <gbm.h> | 8 #include <gbm.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "ui/events/ozone/device/device_manager.h" | 12 #include "ui/events/ozone/device/device_manager.h" |
13 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 13 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 14 #include "ui/ozone/common/window/platform_window_compat.h" |
14 #include "ui/ozone/platform/dri/cursor_factory_evdev_dri.h" | 15 #include "ui/ozone/platform/dri/cursor_factory_evdev_dri.h" |
15 #include "ui/ozone/platform/dri/dri_wrapper.h" | 16 #include "ui/ozone/platform/dri/dri_wrapper.h" |
16 #include "ui/ozone/platform/dri/gbm_buffer.h" | 17 #include "ui/ozone/platform/dri/gbm_buffer.h" |
17 #include "ui/ozone/platform/dri/gbm_surface.h" | 18 #include "ui/ozone/platform/dri/gbm_surface.h" |
18 #include "ui/ozone/platform/dri/gbm_surface_factory.h" | 19 #include "ui/ozone/platform/dri/gbm_surface_factory.h" |
19 #include "ui/ozone/platform/dri/gpu_platform_support_gbm.h" | 20 #include "ui/ozone/platform/dri/gpu_platform_support_gbm.h" |
20 #include "ui/ozone/platform/dri/gpu_platform_support_host_gbm.h" | 21 #include "ui/ozone/platform/dri/gpu_platform_support_host_gbm.h" |
21 #include "ui/ozone/platform/dri/scanout_surface.h" | 22 #include "ui/ozone/platform/dri/scanout_surface.h" |
22 #include "ui/ozone/platform/dri/screen_manager.h" | 23 #include "ui/ozone/platform/dri/screen_manager.h" |
23 #include "ui/ozone/platform/dri/virtual_terminal_manager.h" | 24 #include "ui/ozone/platform/dri/virtual_terminal_manager.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 101 } |
101 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { | 102 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { |
102 return cursor_factory_ozone_.get(); | 103 return cursor_factory_ozone_.get(); |
103 } | 104 } |
104 virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE { | 105 virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE { |
105 return gpu_platform_support_.get(); | 106 return gpu_platform_support_.get(); |
106 } | 107 } |
107 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE { | 108 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE { |
108 return gpu_platform_support_host_.get(); | 109 return gpu_platform_support_host_.get(); |
109 } | 110 } |
| 111 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( |
| 112 PlatformWindowDelegate* delegate, |
| 113 const gfx::Rect& bounds) OVERRIDE { |
| 114 return make_scoped_ptr<PlatformWindow>( |
| 115 new PlatformWindowCompat(delegate, bounds)); |
| 116 } |
110 #if defined(OS_CHROMEOS) | 117 #if defined(OS_CHROMEOS) |
111 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() | 118 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() |
112 OVERRIDE { | 119 OVERRIDE { |
113 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy( | 120 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy( |
114 gpu_platform_support_host_.get(), device_manager_.get())); | 121 gpu_platform_support_host_.get(), device_manager_.get())); |
115 } | 122 } |
116 virtual scoped_ptr<TouchscreenDeviceManager> | 123 virtual scoped_ptr<TouchscreenDeviceManager> |
117 CreateTouchscreenDeviceManager() OVERRIDE { | 124 CreateTouchscreenDeviceManager() OVERRIDE { |
118 return scoped_ptr<TouchscreenDeviceManager>( | 125 return scoped_ptr<TouchscreenDeviceManager>( |
119 new TouchscreenDeviceManagerOzone()); | 126 new TouchscreenDeviceManagerOzone()); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } // namespace | 188 } // namespace |
182 | 189 |
183 OzonePlatform* CreateOzonePlatformGbm() { | 190 OzonePlatform* CreateOzonePlatformGbm() { |
184 return new OzonePlatformGbm(false); | 191 return new OzonePlatformGbm(false); |
185 } | 192 } |
186 OzonePlatform* CreateOzonePlatformGbmEglImage() { | 193 OzonePlatform* CreateOzonePlatformGbmEglImage() { |
187 return new OzonePlatformGbm(true); | 194 return new OzonePlatformGbm(true); |
188 } | 195 } |
189 | 196 |
190 } // namespace ui | 197 } // namespace ui |
OLD | NEW |