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" |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); | 379 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); |
380 cursor_factory_ozone_.reset(new CursorFactoryOzone()); | 380 cursor_factory_ozone_.reset(new CursorFactoryOzone()); |
381 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); | 381 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
382 } | 382 } |
383 | 383 |
384 void InitializeGPU() override { | 384 void InitializeGPU() override { |
385 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_)); | 385 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_)); |
386 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); | 386 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); |
387 } | 387 } |
388 | 388 |
| 389 void InitializeTest() override { |
| 390 InitializeUI(); |
| 391 InitializeGPU(); |
| 392 } |
| 393 |
389 private: | 394 private: |
390 LibeglplatformShimLoader eglplatform_shim_; | 395 LibeglplatformShimLoader eglplatform_shim_; |
391 scoped_ptr<DeviceManager> device_manager_; | 396 scoped_ptr<DeviceManager> device_manager_; |
392 scoped_ptr<SurfaceFactoryEgltest> surface_factory_ozone_; | 397 scoped_ptr<SurfaceFactoryEgltest> surface_factory_ozone_; |
393 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; | 398 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; |
394 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; | 399 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; |
395 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; | 400 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; |
396 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; | 401 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; |
397 scoped_ptr<OverlayManagerOzone> overlay_manager_; | 402 scoped_ptr<OverlayManagerOzone> overlay_manager_; |
398 | 403 |
399 bool shim_initialized_; | 404 bool shim_initialized_; |
400 | 405 |
401 DISALLOW_COPY_AND_ASSIGN(OzonePlatformEgltest); | 406 DISALLOW_COPY_AND_ASSIGN(OzonePlatformEgltest); |
402 }; | 407 }; |
403 | 408 |
404 } // namespace | 409 } // namespace |
405 | 410 |
406 OzonePlatform* CreateOzonePlatformEgltest() { | 411 OzonePlatform* CreateOzonePlatformEgltest() { |
407 OzonePlatformEgltest* platform = new OzonePlatformEgltest; | 412 OzonePlatformEgltest* platform = new OzonePlatformEgltest; |
408 platform->Initialize(); | 413 platform->Initialize(); |
409 return platform; | 414 return platform; |
410 } | 415 } |
411 | 416 |
412 } // namespace ui | 417 } // namespace ui |
OLD | NEW |