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/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/media/video_decode_factory_ozone.h" |
12 #include "ui/ozone/ime/input_method_context_factory_ozone.h" | 13 #include "ui/ozone/ime/input_method_context_factory_ozone.h" |
13 #include "ui/ozone/ozone_platform.h" | 14 #include "ui/ozone/ozone_platform.h" |
14 #include "ui/ozone/ozone_switches.h" | 15 #include "ui/ozone/ozone_switches.h" |
15 | 16 |
16 #if defined(OS_CHROMEOS) | 17 #if defined(OS_CHROMEOS) |
17 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" | 18 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" |
18 #endif | 19 #endif |
19 | 20 |
20 namespace ui { | 21 namespace ui { |
21 | 22 |
(...skipping 15 matching lines...) Expand all Loading... |
37 virtual ui::EventFactoryOzone* GetEventFactoryOzone() OVERRIDE { | 38 virtual ui::EventFactoryOzone* GetEventFactoryOzone() OVERRIDE { |
38 return &event_factory_ozone_; | 39 return &event_factory_ozone_; |
39 } | 40 } |
40 virtual ui::InputMethodContextFactoryOzone* | 41 virtual ui::InputMethodContextFactoryOzone* |
41 GetInputMethodContextFactoryOzone() OVERRIDE { | 42 GetInputMethodContextFactoryOzone() OVERRIDE { |
42 return &input_method_context_factory_ozone_; | 43 return &input_method_context_factory_ozone_; |
43 } | 44 } |
44 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { | 45 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { |
45 return &cursor_factory_ozone_; | 46 return &cursor_factory_ozone_; |
46 } | 47 } |
| 48 virtual ui::VideoDecodeFactoryOzone* GetVideoDecodeFactoryOzone() |
| 49 OVERRIDE { |
| 50 return &video_decode_factory_ozone_; |
| 51 } |
47 | 52 |
48 #if defined(OS_CHROMEOS) | 53 #if defined(OS_CHROMEOS) |
49 virtual scoped_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() | 54 virtual scoped_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() |
50 OVERRIDE { | 55 OVERRIDE { |
51 return scoped_ptr<ui::NativeDisplayDelegate>( | 56 return scoped_ptr<ui::NativeDisplayDelegate>( |
52 new NativeDisplayDelegateOzone()); | 57 new NativeDisplayDelegateOzone()); |
53 } | 58 } |
54 #endif | 59 #endif |
55 | 60 |
56 private: | 61 private: |
57 gfx::FileSurfaceFactory surface_factory_ozone_; | 62 gfx::FileSurfaceFactory surface_factory_ozone_; |
58 ui::EventFactoryEvdev event_factory_ozone_; | 63 ui::EventFactoryEvdev event_factory_ozone_; |
59 ui::InputMethodContextFactoryOzone input_method_context_factory_ozone_; | 64 ui::InputMethodContextFactoryOzone input_method_context_factory_ozone_; |
60 ui::CursorFactoryOzone cursor_factory_ozone_; | 65 ui::CursorFactoryOzone cursor_factory_ozone_; |
| 66 ui::VideoDecodeFactoryOzone video_decode_factory_ozone_; |
61 | 67 |
62 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest); | 68 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest); |
63 }; | 69 }; |
64 | 70 |
65 } // namespace | 71 } // namespace |
66 | 72 |
67 OzonePlatform* CreateOzonePlatformTest() { | 73 OzonePlatform* CreateOzonePlatformTest() { |
68 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 74 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
69 base::FilePath location = base::FilePath("/dev/null"); | 75 base::FilePath location = base::FilePath("/dev/null"); |
70 if (cmd->HasSwitch(switches::kOzoneDumpFile)) | 76 if (cmd->HasSwitch(switches::kOzoneDumpFile)) |
71 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); | 77 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); |
72 return new OzonePlatformTest(location); | 78 return new OzonePlatformTest(location); |
73 } | 79 } |
74 | 80 |
75 } // namespace ui | 81 } // namespace ui |
OLD | NEW |