Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |