| 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/egltest/ozone_platform_egltest.h" | 5 #include "ui/ozone/platform/egltest/ozone_platform_egltest.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "library_loaders/libeglplatform_shim.h" | 12 #include "library_loaders/libeglplatform_shim.h" |
| 13 #include "third_party/khronos/EGL/egl.h" | 13 #include "third_party/khronos/EGL/egl.h" |
| 14 #include "ui/events/devices/device_data_manager.h" | 14 #include "ui/events/devices/device_data_manager.h" |
| 15 #include "ui/events/event.h" | 15 #include "ui/events/event.h" |
| 16 #include "ui/events/ozone/device/device_manager.h" | 16 #include "ui/events/ozone/device/device_manager.h" |
| 17 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 17 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 18 #include "ui/events/ozone/events_ozone.h" | 18 #include "ui/events/ozone/events_ozone.h" |
| 19 #include "ui/events/platform/platform_event_dispatcher.h" | 19 #include "ui/events/platform/platform_event_dispatcher.h" |
| 20 #include "ui/gfx/vsync_provider.h" | 20 #include "ui/gfx/vsync_provider.h" |
| 21 #include "ui/ozone/common/native_display_delegate_ozone.h" | 21 #include "ui/ozone/common/native_display_delegate_ozone.h" |
| 22 #include "ui/ozone/public/cursor_factory_ozone.h" | 22 #include "ui/ozone/public/cursor_factory_ozone.h" |
| 23 #include "ui/ozone/public/gpu_platform_support.h" | 23 #include "ui/ozone/public/gpu_platform_support.h" |
| 24 #include "ui/ozone/public/gpu_platform_support_host.h" | 24 #include "ui/ozone/public/gpu_platform_support_host.h" |
| 25 #include "ui/ozone/public/ozone_platform.h" | 25 #include "ui/ozone/public/ozone_platform.h" |
| 26 #include "ui/ozone/public/ozone_switches.h" | 26 #include "ui/ozone/public/ozone_switches.h" |
| 27 #include "ui/ozone/public/surface_factory_ozone.h" | 27 #include "ui/ozone/public/surface_factory_ozone.h" |
| 28 #include "ui/ozone/public/surface_ozone_egl.h" | 28 #include "ui/ozone/public/surface_ozone_egl.h" |
| 29 #include "ui/ozone/public/system_input_injector.h" |
| 29 #include "ui/platform_window/platform_window.h" | 30 #include "ui/platform_window/platform_window.h" |
| 30 #include "ui/platform_window/platform_window_delegate.h" | 31 #include "ui/platform_window/platform_window_delegate.h" |
| 31 | 32 |
| 32 namespace ui { | 33 namespace ui { |
| 33 | 34 |
| 34 namespace { | 35 namespace { |
| 35 | 36 |
| 36 const char kEglplatformShim[] = "EGLPLATFORM_SHIM"; | 37 const char kEglplatformShim[] = "EGLPLATFORM_SHIM"; |
| 37 const char kEglplatformShimDefault[] = "libeglplatform_shim.so.1"; | 38 const char kEglplatformShimDefault[] = "libeglplatform_shim.so.1"; |
| 38 const char kDefaultEglSoname[] = "libEGL.so.1"; | 39 const char kDefaultEglSoname[] = "libEGL.so.1"; |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 349 } |
| 349 CursorFactoryOzone* GetCursorFactoryOzone() override { | 350 CursorFactoryOzone* GetCursorFactoryOzone() override { |
| 350 return cursor_factory_ozone_.get(); | 351 return cursor_factory_ozone_.get(); |
| 351 } | 352 } |
| 352 GpuPlatformSupport* GetGpuPlatformSupport() override { | 353 GpuPlatformSupport* GetGpuPlatformSupport() override { |
| 353 return gpu_platform_support_.get(); | 354 return gpu_platform_support_.get(); |
| 354 } | 355 } |
| 355 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { | 356 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { |
| 356 return gpu_platform_support_host_.get(); | 357 return gpu_platform_support_host_.get(); |
| 357 } | 358 } |
| 359 scoped_ptr<SystemInputInjector> CreateSystemInputInjector() override { |
| 360 return nullptr; // no input injection support. |
| 361 } |
| 358 scoped_ptr<PlatformWindow> CreatePlatformWindow( | 362 scoped_ptr<PlatformWindow> CreatePlatformWindow( |
| 359 PlatformWindowDelegate* delegate, | 363 PlatformWindowDelegate* delegate, |
| 360 const gfx::Rect& bounds) override { | 364 const gfx::Rect& bounds) override { |
| 361 return make_scoped_ptr<PlatformWindow>( | 365 return make_scoped_ptr<PlatformWindow>( |
| 362 new EgltestWindow(delegate, | 366 new EgltestWindow(delegate, |
| 363 &eglplatform_shim_, | 367 &eglplatform_shim_, |
| 364 event_factory_ozone_.get(), | 368 event_factory_ozone_.get(), |
| 365 bounds)); | 369 bounds)); |
| 366 } | 370 } |
| 367 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { | 371 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 | 406 |
| 403 } // namespace | 407 } // namespace |
| 404 | 408 |
| 405 OzonePlatform* CreateOzonePlatformEgltest() { | 409 OzonePlatform* CreateOzonePlatformEgltest() { |
| 406 OzonePlatformEgltest* platform = new OzonePlatformEgltest; | 410 OzonePlatformEgltest* platform = new OzonePlatformEgltest; |
| 407 platform->Initialize(); | 411 platform->Initialize(); |
| 408 return platform; | 412 return platform; |
| 409 } | 413 } |
| 410 | 414 |
| 411 } // namespace ui | 415 } // namespace ui |
| OLD | NEW |