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

Unified Diff: ui/base/ozone/ozone_platform.cc

Issue 44933002: Implement OzonePlatform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add external_ozone_platform_files, external_ozone_platform_deps 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/base/ozone/ozone_platform.cc
diff --git a/ui/base/ozone/ozone_platform.cc b/ui/base/ozone/ozone_platform.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ea638c24719b2ee256cbe9829feeb3e28b6f4fbb
--- /dev/null
+++ b/ui/base/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/base/ozone/ozone_platform.h"
+
+namespace ui {
+
+OzonePlatform::OzonePlatform() {}
+
+OzonePlatform::~OzonePlatform() {
+ gfx::SurfaceFactoryOzone::SetInstance(NULL);
+ ui::EventFactoryOzone::SetInstance(NULL);
+}
+
+// static
+OzonePlatform* OzonePlatform::Create() {
+ OzonePlatform* platform = CreateDefaultOzonePlatform();
+
+ gfx::SurfaceFactoryOzone::SetInstance(platform->GetSurfaceFactoryOzone());
+ ui::EventFactoryOzone::SetInstance(platform->GetEventFactoryOzone());
+
vignatti (out of this project) 2013/10/28 15:26:44 In the description you mention that it "depends on
spang 2013/10/28 15:42:30 We can't actually add a dependency from ui/base to
vignatti (out of this project) 2013/10/28 16:08:50 ok, I see. I'm very interested then to hear what'
+ return platform;
+}
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698