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/bitmap_cursor_factory_ozone.h" | 9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" |
10 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 10 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
11 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" | 11 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" |
12 #include "ui/events/platform/platform_event_source.h" | 12 #include "ui/events/platform/platform_event_source.h" |
13 #include "ui/ozone/common/native_display_delegate_ozone.h" | 13 #include "ui/ozone/common/native_display_delegate_ozone.h" |
14 #include "ui/ozone/common/stub_overlay_manager.h" | 14 #include "ui/ozone/common/stub_overlay_manager.h" |
15 #include "ui/ozone/platform/test/test_window.h" | 15 #include "ui/ozone/platform/test/test_window.h" |
16 #include "ui/ozone/platform/test/test_window_manager.h" | 16 #include "ui/ozone/platform/test/test_window_manager.h" |
17 #include "ui/ozone/public/cursor_factory_ozone.h" | 17 #include "ui/ozone/public/cursor_factory_ozone.h" |
18 #include "ui/ozone/public/gpu_platform_support.h" | 18 #include "ui/ozone/public/gpu_platform_support.h" |
19 #include "ui/ozone/public/gpu_platform_support_host.h" | 19 #include "ui/ozone/public/gpu_platform_support_host.h" |
20 #include "ui/ozone/public/input_controller.h" | 20 #include "ui/ozone/public/input_controller.h" |
21 #include "ui/ozone/public/native_pixmap_client.h" | |
21 #include "ui/ozone/public/ozone_platform.h" | 22 #include "ui/ozone/public/ozone_platform.h" |
22 #include "ui/ozone/public/ozone_switches.h" | 23 #include "ui/ozone/public/ozone_switches.h" |
23 #include "ui/ozone/public/system_input_injector.h" | 24 #include "ui/ozone/public/system_input_injector.h" |
24 | 25 |
25 namespace ui { | 26 namespace ui { |
26 | 27 |
27 namespace { | 28 namespace { |
28 | 29 |
29 // A test implementation of PlatformEventSource that we can instantiate to make | 30 // A test implementation of PlatformEventSource that we can instantiate to make |
30 // sure that the PlatformEventSource has an instance while in unit tests. | 31 // sure that the PlatformEventSource has an instance while in unit tests. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; | 103 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; |
103 scoped_ptr<InputController> input_controller_; | 104 scoped_ptr<InputController> input_controller_; |
104 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; | 105 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; |
105 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; | 106 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; |
106 scoped_ptr<OverlayManagerOzone> overlay_manager_; | 107 scoped_ptr<OverlayManagerOzone> overlay_manager_; |
107 base::FilePath file_path_; | 108 base::FilePath file_path_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest); | 110 DISALLOW_COPY_AND_ASSIGN(OzonePlatformTest); |
110 }; | 111 }; |
111 | 112 |
113 class NativePixmapClientTest : public NativePixmapClient { | |
114 public: | |
115 NativePixmapClientTest() {} | |
116 ~NativePixmapClientTest() override {} | |
117 | |
118 private: | |
119 DISALLOW_COPY_AND_ASSIGN(NativePixmapClientTest); | |
120 }; | |
121 | |
112 } // namespace | 122 } // namespace |
113 | 123 |
114 OzonePlatform* CreateOzonePlatformTest() { | 124 OzonePlatform* CreateOzonePlatformTest() { |
115 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 125 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
116 base::FilePath location; | 126 base::FilePath location; |
117 if (cmd->HasSwitch(switches::kOzoneDumpFile)) | 127 if (cmd->HasSwitch(switches::kOzoneDumpFile)) |
118 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); | 128 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); |
119 return new OzonePlatformTest(location); | 129 return new OzonePlatformTest(location); |
120 } | 130 } |
121 | 131 |
132 NativePixmapClient* CreateNativePixmapClientTest() { | |
133 return new NativePixmapClientTest; | |
spang
2015/06/05 19:21:54
Make a function
// native_pixmap_client.h
OZONE_
dshwang
2015/06/08 11:15:14
Done.
| |
134 } | |
135 | |
122 } // namespace ui | 136 } // namespace ui |
OLD | NEW |