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 #ifndef UI_OZONE_PLATFORM_TEST_OZONE_PLATFORM_TEST_H_ | 5 #ifndef UI_OZONE_PLATFORM_TEST_OZONE_PLATFORM_TEST_H_ |
6 #define UI_OZONE_PLATFORM_TEST_OZONE_PLATFORM_TEST_H_ | 6 #define UI_OZONE_PLATFORM_TEST_OZONE_PLATFORM_TEST_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" | 9 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" |
10 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 10 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
11 #include "ui/gfx/ozone/impl/file_surface_factory.h" | 11 #include "ui/gfx/ozone/impl/file_surface_factory.h" |
12 #include "ui/ozone/ozone_platform.h" | 12 #include "ui/ozone/ozone_platform.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 // OzonePlatform for testing | 16 // OzonePlatform for testing |
17 // | 17 // |
18 // This platform dumps images to a file for testing purposes. | 18 // This platform dumps images to a file for testing purposes. |
19 class OzonePlatformTest : public OzonePlatform { | 19 class OzonePlatformTest : public OzonePlatform { |
20 public: | 20 public: |
21 OzonePlatformTest(const base::FilePath& dump_file); | 21 OzonePlatformTest(const base::FilePath& dump_file); |
22 virtual ~OzonePlatformTest(); | 22 virtual ~OzonePlatformTest(); |
23 | 23 |
24 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE; | 24 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE; |
25 virtual ui::EventFactoryOzone* GetEventFactoryOzone() OVERRIDE; | 25 virtual ui::EventFactoryOzone* GetEventFactoryOzone() OVERRIDE; |
26 virtual ui::InputMethodContextFactoryOzone* | 26 virtual ui::InputMethodContextFactoryOzone* |
27 GetInputMethodContextFactoryOzone() OVERRIDE; | 27 GetInputMethodContextFactoryOzone() OVERRIDE; |
28 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE; | 28 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE; |
| 29 #if defined(OS_CHROMEOS) |
| 30 virtual scoped_ptr<ui::NativeDisplayDelegate> |
| 31 CreateNativeDisplayDelegate() OVERRIDE; |
| 32 #endif |
29 | 33 |
30 private: | 34 private: |
31 gfx::FileSurfaceFactory surface_factory_ozone_; | 35 gfx::FileSurfaceFactory surface_factory_ozone_; |
32 ui::EventFactoryEvdev event_factory_ozone_; | 36 ui::EventFactoryEvdev event_factory_ozone_; |
33 ui::InputMethodContextFactoryOzone input_method_context_factory_ozone_; | 37 ui::InputMethodContextFactoryOzone input_method_context_factory_ozone_; |
34 ui::CursorFactoryOzone cursor_factory_ozone_; | 38 ui::CursorFactoryOzone cursor_factory_ozone_; |
35 | 39 |
36 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest); | 40 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest); |
37 }; | 41 }; |
38 | 42 |
39 // Constructor hook for use in ozone_platform_list.cc | 43 // Constructor hook for use in ozone_platform_list.cc |
40 OzonePlatform* CreateOzonePlatformTest(); | 44 OzonePlatform* CreateOzonePlatformTest(); |
41 | 45 |
42 } // namespace ui | 46 } // namespace ui |
43 | 47 |
44 #endif // UI_OZONE_PLATFORM_TEST_OZONE_PLATFORM_TEST_H_ | 48 #endif // UI_OZONE_PLATFORM_TEST_OZONE_PLATFORM_TEST_H_ |
OLD | NEW |