| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/shell/context.h" | 5 #include "mojo/shell/context.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 gles2::GLES2SupportImpl::Init(); | 47 gles2::GLES2SupportImpl::Init(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 ~Setup() { | 50 ~Setup() { |
| 51 } | 51 } |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 DISALLOW_COPY_AND_ASSIGN(Setup); | 54 DISALLOW_COPY_AND_ASSIGN(Setup); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 static base::LazyInstance<Setup> setup = LAZY_INSTANCE_INITIALIZER; | 57 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER; |
| 58 | 58 |
| 59 } // namespace | 59 } // namespace |
| 60 | 60 |
| 61 class Context::NativeViewportServiceLoader : public ServiceLoader { | 61 class Context::NativeViewportServiceLoader : public ServiceLoader { |
| 62 public: | 62 public: |
| 63 explicit NativeViewportServiceLoader(Context* context) : context_(context) {} | 63 explicit NativeViewportServiceLoader(Context* context) : context_(context) {} |
| 64 virtual ~NativeViewportServiceLoader() {} | 64 virtual ~NativeViewportServiceLoader() {} |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 virtual void LoadService(ServiceManager* manager, | 67 virtual void LoadService(ServiceManager* manager, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 #if defined(USE_AURA) | 132 #if defined(USE_AURA) |
| 133 service_manager_.SetLoaderForURL( | 133 service_manager_.SetLoaderForURL( |
| 134 scoped_ptr<ServiceLoader>(), | 134 scoped_ptr<ServiceLoader>(), |
| 135 GURL("mojo:mojo_view_manager")); | 135 GURL("mojo:mojo_view_manager")); |
| 136 #endif | 136 #endif |
| 137 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); | 137 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace shell | 140 } // namespace shell |
| 141 } // namespace mojo | 141 } // namespace mojo |
| OLD | NEW |