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

Side by Side 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: proof-read 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
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/base/ozone/surface_factory_ozone.h"
6
7 #include "base/lazy_instance.h"
8 #include "base/memory/scoped_ptr.h"
9
10 namespace ui {
11
12 // Implementation.
13 static base::LazyInstance<scoped_ptr<SurfaceFactoryOzone> > impl_ =
14 LAZY_INSTANCE_INITIALIZER;
15
16 SurfaceFactoryOzone::SurfaceFactoryOzone() {
17 }
18
19 SurfaceFactoryOzone::~SurfaceFactoryOzone() {
20 }
21
22 SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
23 return impl_.Get().get();
24 }
25
26 void SurfaceFactoryOzone::SetInstance(SurfaceFactoryOzone* impl) {
27 impl_.Get().reset(impl);
28 }
29
30 const char* SurfaceFactoryOzone::DefaultDisplaySpec() {
31 char* envvar = getenv("ASH_DISPLAY_SPEC");
32 if (envvar)
33 return envvar;
34 else
sky 2013/05/23 23:47:20 nit: no else (the style guide actually says no els
35 return "720x1280*2";
36 }
37
38 } // namespace ui
OLDNEW
« 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