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/ozone/ozone_platform.h" | 9 #include "ui/ozone/ozone_platform.h" |
10 #include "ui/ozone/ozone_switches.h" | 10 #include "ui/ozone/ozone_switches.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 | 13 |
14 OzonePlatformTest::OzonePlatformTest(const base::FilePath& dump_file) | 14 OzonePlatformTest::OzonePlatformTest(const base::FilePath& dump_file) |
15 : surface_factory_ozone_(dump_file) {} | 15 : surface_factory_ozone_(dump_file) {} |
16 | 16 |
17 OzonePlatformTest::~OzonePlatformTest() {} | 17 OzonePlatformTest::~OzonePlatformTest() {} |
18 | 18 |
19 gfx::SurfaceFactoryOzone* OzonePlatformTest::GetSurfaceFactoryOzone() { | 19 gfx::SurfaceFactoryOzone* OzonePlatformTest::GetSurfaceFactoryOzone() { |
20 return &surface_factory_ozone_; | 20 return &surface_factory_ozone_; |
21 } | 21 } |
22 | 22 |
23 ui::EventFactoryOzone* OzonePlatformTest::GetEventFactoryOzone() { | 23 ui::EventFactoryOzone* OzonePlatformTest::GetEventFactoryOzone() { |
24 return &event_factory_ozone_; | 24 return &event_factory_ozone_; |
25 } | 25 } |
26 | 26 |
27 OzonePlatform* CreateDefaultOzonePlatform() { | 27 OzonePlatform* CreateOzonePlatformTest() { |
28 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 28 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
29 base::FilePath location = base::FilePath("/dev/null"); | 29 base::FilePath location = base::FilePath("/dev/null"); |
30 if (cmd->HasSwitch(switches::kOzoneDumpFile)) | 30 if (cmd->HasSwitch(switches::kOzoneDumpFile)) |
31 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); | 31 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); |
32 return new OzonePlatformTest(location); | 32 return new OzonePlatformTest(location); |
33 } | 33 } |
34 | 34 |
35 } // namespace ui | 35 } // namespace ui |
OLD | NEW |