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

Unified Diff: ui/ozone/ozone_platform.cc

Issue 44933002: Implement OzonePlatform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698