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/common/window/platform_window_compat.h" |
11 #include "ui/ozone/platform/test/file_surface_factory.h" | 12 #include "ui/ozone/platform/test/file_surface_factory.h" |
12 #include "ui/ozone/platform/test/test_cursor_factory.h" | 13 #include "ui/ozone/platform/test/test_cursor_factory.h" |
13 #include "ui/ozone/public/gpu_platform_support.h" | 14 #include "ui/ozone/public/gpu_platform_support.h" |
14 #include "ui/ozone/public/gpu_platform_support_host.h" | 15 #include "ui/ozone/public/gpu_platform_support_host.h" |
15 #include "ui/ozone/public/ozone_platform.h" | 16 #include "ui/ozone/public/ozone_platform.h" |
16 #include "ui/ozone/public/ozone_switches.h" | 17 #include "ui/ozone/public/ozone_switches.h" |
17 | 18 |
18 #if defined(OS_CHROMEOS) | 19 #if defined(OS_CHROMEOS) |
19 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" | 20 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" |
20 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" | 21 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" |
(...skipping 20 matching lines...) Expand all Loading... |
41 } | 42 } |
42 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { | 43 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { |
43 return cursor_factory_ozone_.get(); | 44 return cursor_factory_ozone_.get(); |
44 } | 45 } |
45 virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE { | 46 virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE { |
46 return gpu_platform_support_.get(); | 47 return gpu_platform_support_.get(); |
47 } | 48 } |
48 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE { | 49 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE { |
49 return gpu_platform_support_host_.get(); | 50 return gpu_platform_support_host_.get(); |
50 } | 51 } |
| 52 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( |
| 53 PlatformWindowDelegate* delegate, |
| 54 const gfx::Rect& bounds) OVERRIDE { |
| 55 return make_scoped_ptr<PlatformWindow>( |
| 56 new PlatformWindowCompat(delegate, bounds)); |
| 57 } |
51 | 58 |
52 #if defined(OS_CHROMEOS) | 59 #if defined(OS_CHROMEOS) |
53 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() | 60 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() |
54 OVERRIDE { | 61 OVERRIDE { |
55 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone()); | 62 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone()); |
56 } | 63 } |
57 virtual scoped_ptr<TouchscreenDeviceManager> | 64 virtual scoped_ptr<TouchscreenDeviceManager> |
58 CreateTouchscreenDeviceManager() OVERRIDE { | 65 CreateTouchscreenDeviceManager() OVERRIDE { |
59 return scoped_ptr<TouchscreenDeviceManager>( | 66 return scoped_ptr<TouchscreenDeviceManager>( |
60 new TouchscreenDeviceManagerOzone()); | 67 new TouchscreenDeviceManagerOzone()); |
(...skipping 29 matching lines...) Expand all Loading... |
90 | 97 |
91 OzonePlatform* CreateOzonePlatformTest() { | 98 OzonePlatform* CreateOzonePlatformTest() { |
92 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 99 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
93 base::FilePath location = base::FilePath("/dev/null"); | 100 base::FilePath location = base::FilePath("/dev/null"); |
94 if (cmd->HasSwitch(switches::kOzoneDumpFile)) | 101 if (cmd->HasSwitch(switches::kOzoneDumpFile)) |
95 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); | 102 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); |
96 return new OzonePlatformTest(location); | 103 return new OzonePlatformTest(location); |
97 } | 104 } |
98 | 105 |
99 } // namespace ui | 106 } // namespace ui |
OLD | NEW |