| 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/file_descriptor_posix.h" |
| 10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 11 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 12 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
| 13 #include "library_loaders/libeglplatform_shim.h" | 14 #include "library_loaders/libeglplatform_shim.h" |
| 14 #include "third_party/khronos/EGL/egl.h" | 15 #include "third_party/khronos/EGL/egl.h" |
| 15 #include "ui/events/devices/device_data_manager.h" | 16 #include "ui/events/devices/device_data_manager.h" |
| 16 #include "ui/events/event.h" | 17 #include "ui/events/event.h" |
| 17 #include "ui/events/ozone/device/device_manager.h" | 18 #include "ui/events/ozone/device/device_manager.h" |
| 18 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 19 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 19 #include "ui/events/ozone/events_ozone.h" | 20 #include "ui/events/ozone/events_ozone.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 367 } |
| 367 scoped_ptr<PlatformWindow> CreatePlatformWindow( | 368 scoped_ptr<PlatformWindow> CreatePlatformWindow( |
| 368 PlatformWindowDelegate* delegate, | 369 PlatformWindowDelegate* delegate, |
| 369 const gfx::Rect& bounds) override { | 370 const gfx::Rect& bounds) override { |
| 370 return make_scoped_ptr<PlatformWindow>(new EgltestWindow( | 371 return make_scoped_ptr<PlatformWindow>(new EgltestWindow( |
| 371 delegate, &eglplatform_shim_, event_factory_ozone_.get(), bounds)); | 372 delegate, &eglplatform_shim_, event_factory_ozone_.get(), bounds)); |
| 372 } | 373 } |
| 373 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { | 374 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { |
| 374 return make_scoped_ptr(new NativeDisplayDelegateOzone()); | 375 return make_scoped_ptr(new NativeDisplayDelegateOzone()); |
| 375 } | 376 } |
| 377 base::FileDescriptor GetVirtualDeviceFd() override { |
| 378 return base::FileDescriptor(); |
| 379 } |
| 376 | 380 |
| 377 void InitializeUI() override { | 381 void InitializeUI() override { |
| 378 device_manager_ = CreateDeviceManager(); | 382 device_manager_ = CreateDeviceManager(); |
| 379 overlay_manager_.reset(new StubOverlayManager()); | 383 overlay_manager_.reset(new StubOverlayManager()); |
| 380 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( | 384 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( |
| 381 make_scoped_ptr(new StubKeyboardLayoutEngine())); | 385 make_scoped_ptr(new StubKeyboardLayoutEngine())); |
| 382 event_factory_ozone_.reset(new EventFactoryEvdev( | 386 event_factory_ozone_.reset(new EventFactoryEvdev( |
| 383 NULL, device_manager_.get(), | 387 NULL, device_manager_.get(), |
| 384 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); | 388 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); |
| 385 cursor_factory_ozone_.reset(new CursorFactoryOzone()); | 389 cursor_factory_ozone_.reset(new CursorFactoryOzone()); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 408 | 412 |
| 409 } // namespace | 413 } // namespace |
| 410 | 414 |
| 411 OzonePlatform* CreateOzonePlatformEgltest() { | 415 OzonePlatform* CreateOzonePlatformEgltest() { |
| 412 OzonePlatformEgltest* platform = new OzonePlatformEgltest; | 416 OzonePlatformEgltest* platform = new OzonePlatformEgltest; |
| 413 platform->Initialize(); | 417 platform->Initialize(); |
| 414 return platform; | 418 return platform; |
| 415 } | 419 } |
| 416 | 420 |
| 417 } // namespace ui | 421 } // namespace ui |
| OLD | NEW |