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

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

Issue 13886018: Add a factory and defines for native Linux surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 7 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
« no previous file with comments | « ui/base/ozone/surface_factory_ozone.h ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ozone/surface_factory_ozone.cc
diff --git a/ui/base/ozone/surface_factory_ozone.cc b/ui/base/ozone/surface_factory_ozone.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ad9ddb8deaef75c27d7a0b083b2aa6c6f595a60b
--- /dev/null
+++ b/ui/base/ozone/surface_factory_ozone.cc
@@ -0,0 +1,37 @@
+// 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 "ui/base/ozone/surface_factory_ozone.h"
+
+#include "base/lazy_instance.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace ui {
+
+// Implementation.
+static base::LazyInstance<scoped_ptr<SurfaceFactoryOzone> > impl_ =
+ LAZY_INSTANCE_INITIALIZER;
+
+SurfaceFactoryOzone::SurfaceFactoryOzone() {
+}
+
+SurfaceFactoryOzone::~SurfaceFactoryOzone() {
+}
+
+SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
+ return impl_.Get().get();
+}
+
+void SurfaceFactoryOzone::SetInstance(SurfaceFactoryOzone* impl) {
+ impl_.Get().reset(impl);
+}
+
+const char* SurfaceFactoryOzone::DefaultDisplaySpec() {
+ char* envvar = getenv("ASH_DISPLAY_SPEC");
+ if (envvar)
+ return envvar;
+ return "720x1280*2";
+}
+
+} // namespace ui
« no previous file with comments | « ui/base/ozone/surface_factory_ozone.h ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698