Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: ui/ozone/platform/test/ozone_platform_test.cc

Issue 44933002: Implement OzonePlatform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/ozone/platform/test/ozone_platform_test.h"
6
7 #include "base/command_line.h"
8 #include "base/files/file_path.h"
9 #include "ui/ozone/ozone_platform.h"
10 #include "ui/ozone/ozone_switches.h"
11
12 namespace ui {
13
14 OzonePlatformTest::OzonePlatformTest(const base::FilePath& dump_file)
15 : surface_factory_ozone_(dump_file) {}
16
17 OzonePlatformTest::~OzonePlatformTest() {}
18
19 gfx::SurfaceFactoryOzone* OzonePlatformTest::GetSurfaceFactoryOzone() {
20 return &surface_factory_ozone_;
21 }
22
23 ui::EventFactoryOzone* OzonePlatformTest::GetEventFactoryOzone() {
24 return &event_factory_ozone_;
25 }
26
27 OzonePlatform* CreateDefaultOzonePlatform() {
28 CommandLine* cmd = CommandLine::ForCurrentProcess();
29 base::FilePath location = base::FilePath("/dev/null");
30 if (cmd->HasSwitch(switches::kOzoneDumpFile))
31 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile);
32 return new OzonePlatformTest(location);
33 }
34
35 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698