| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/ozone_platform_test.h" | 5 #include "ui/ozone/platform/test/ozone_platform_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "ui/events/ozone/device/device_manager.h" | 9 #include "ui/events/ozone/device/device_manager.h" |
| 10 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 10 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 11 #include "ui/ozone/ozone_platform.h" | 11 #include "ui/ozone/ozone_platform.h" |
| 12 #include "ui/ozone/ozone_switches.h" | 12 #include "ui/ozone/ozone_switches.h" |
| 13 #include "ui/ozone/platform/test/file_surface_factory.h" | 13 #include "ui/ozone/platform/test/file_surface_factory.h" |
| 14 #include "ui/ozone/public/cursor_factory_ozone.h" | 14 #include "ui/ozone/platform/test/test_cursor_factory.h" |
| 15 #include "ui/ozone/public/gpu_platform_support.h" | 15 #include "ui/ozone/public/gpu_platform_support.h" |
| 16 #include "ui/ozone/public/gpu_platform_support_host.h" | 16 #include "ui/ozone/public/gpu_platform_support_host.h" |
| 17 | 17 |
| 18 #if defined(OS_CHROMEOS) | 18 #if defined(OS_CHROMEOS) |
| 19 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" | 19 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" |
| 20 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" | 20 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 namespace ui { | 23 namespace ui { |
| 24 | 24 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 return scoped_ptr<TouchscreenDeviceManager>( | 59 return scoped_ptr<TouchscreenDeviceManager>( |
| 60 new TouchscreenDeviceManagerOzone()); | 60 new TouchscreenDeviceManagerOzone()); |
| 61 } | 61 } |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 virtual void InitializeUI() OVERRIDE { | 64 virtual void InitializeUI() OVERRIDE { |
| 65 device_manager_ = CreateDeviceManager(); | 65 device_manager_ = CreateDeviceManager(); |
| 66 surface_factory_ozone_.reset(new FileSurfaceFactory(file_path_)); | 66 surface_factory_ozone_.reset(new FileSurfaceFactory(file_path_)); |
| 67 event_factory_ozone_.reset( | 67 event_factory_ozone_.reset( |
| 68 new EventFactoryEvdev(NULL, device_manager_.get())); | 68 new EventFactoryEvdev(NULL, device_manager_.get())); |
| 69 cursor_factory_ozone_.reset(new CursorFactoryOzone()); | 69 cursor_factory_ozone_.reset(new TestCursorFactory()); |
| 70 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); | 70 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 virtual void InitializeGPU() OVERRIDE { | 73 virtual void InitializeGPU() OVERRIDE { |
| 74 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); | 74 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 scoped_ptr<DeviceManager> device_manager_; | 78 scoped_ptr<DeviceManager> device_manager_; |
| 79 scoped_ptr<FileSurfaceFactory> surface_factory_ozone_; | 79 scoped_ptr<FileSurfaceFactory> surface_factory_ozone_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 90 | 90 |
| 91 OzonePlatform* CreateOzonePlatformTest() { | 91 OzonePlatform* CreateOzonePlatformTest() { |
| 92 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 92 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
| 93 base::FilePath location = base::FilePath("/dev/null"); | 93 base::FilePath location = base::FilePath("/dev/null"); |
| 94 if (cmd->HasSwitch(switches::kOzoneDumpFile)) | 94 if (cmd->HasSwitch(switches::kOzoneDumpFile)) |
| 95 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); | 95 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); |
| 96 return new OzonePlatformTest(location); | 96 return new OzonePlatformTest(location); |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace ui | 99 } // namespace ui |
| OLD | NEW |