Chromium Code Reviews| Index: ui/ozone/ozone_platform.cc |
| diff --git a/ui/ozone/ozone_platform.cc b/ui/ozone/ozone_platform.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f86cf0213d12d2f48d235dd796479682c32c4f99 |
| --- /dev/null |
| +++ b/ui/ozone/ozone_platform.cc |
| @@ -0,0 +1,28 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/command_line.h" |
| +#include "base/logging.h" |
| +#include "ui/ozone/ozone_platform.h" |
| + |
| +namespace ui { |
| + |
| +OzonePlatform::OzonePlatform() {} |
| + |
| +OzonePlatform::~OzonePlatform() { |
| + gfx::SurfaceFactoryOzone::SetInstance(NULL); |
|
rjkroege
2013/10/25 18:24:02
I will be curious if this ever results in a null i
|
| + ui::EventFactoryOzone::SetInstance(NULL); |
| +} |
| + |
| +// static |
| +OzonePlatform* OzonePlatform::Create() { |
| + OzonePlatform* platform = CreateDefaultOzonePlatform(); |
| + |
| + gfx::SurfaceFactoryOzone::SetInstance(platform->GetSurfaceFactoryOzone()); |
| + ui::EventFactoryOzone::SetInstance(platform->GetEventFactoryOzone()); |
| + |
| + return platform; |
| +} |
| + |
| +} // namespace ui |