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" |
11 #include "mojo/embedder/embedder.h" | 11 #include "mojo/embedder/embedder.h" |
12 #include "mojo/gles2/gles2_support_impl.h" | |
13 #include "mojo/public/cpp/application/application_impl.h" | 12 #include "mojo/public/cpp/application/application_impl.h" |
14 #include "mojo/service_manager/background_service_loader.h" | 13 #include "mojo/service_manager/background_service_loader.h" |
15 #include "mojo/service_manager/service_loader.h" | 14 #include "mojo/service_manager/service_loader.h" |
16 #include "mojo/service_manager/service_manager.h" | 15 #include "mojo/service_manager/service_manager.h" |
17 #include "mojo/services/native_viewport/native_viewport_service.h" | 16 #include "mojo/services/native_viewport/native_viewport_service.h" |
18 #include "mojo/shell/dynamic_service_loader.h" | 17 #include "mojo/shell/dynamic_service_loader.h" |
19 #include "mojo/shell/in_process_dynamic_service_runner.h" | 18 #include "mojo/shell/in_process_dynamic_service_runner.h" |
20 #include "mojo/shell/out_of_process_dynamic_service_runner.h" | 19 #include "mojo/shell/out_of_process_dynamic_service_runner.h" |
21 #include "mojo/shell/switches.h" | 20 #include "mojo/shell/switches.h" |
22 #include "mojo/shell/ui_service_loader_android.h" | 21 #include "mojo/shell/ui_service_loader_android.h" |
(...skipping 19 matching lines...) Expand all Loading... |
42 // correspond to shared libraries bundled alongside the mojo_shell. | 41 // correspond to shared libraries bundled alongside the mojo_shell. |
43 const char* kLocalMojoURLs[] = { | 42 const char* kLocalMojoURLs[] = { |
44 "mojo:mojo_network_service", | 43 "mojo:mojo_network_service", |
45 }; | 44 }; |
46 | 45 |
47 // Used to ensure we only init once. | 46 // Used to ensure we only init once. |
48 class Setup { | 47 class Setup { |
49 public: | 48 public: |
50 Setup() { | 49 Setup() { |
51 embedder::Init(); | 50 embedder::Init(); |
52 gles2::GLES2SupportImpl::Init(); | |
53 } | 51 } |
54 | 52 |
55 ~Setup() { | 53 ~Setup() { |
56 } | 54 } |
57 | 55 |
58 private: | 56 private: |
59 DISALLOW_COPY_AND_ASSIGN(Setup); | 57 DISALLOW_COPY_AND_ASSIGN(Setup); |
60 }; | 58 }; |
61 | 59 |
62 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER; | 60 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); | 160 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); |
163 service_manager_.TerminateShellConnections(); | 161 service_manager_.TerminateShellConnections(); |
164 } | 162 } |
165 | 163 |
166 Context::~Context() { | 164 Context::~Context() { |
167 Shutdown(); | 165 Shutdown(); |
168 } | 166 } |
169 | 167 |
170 } // namespace shell | 168 } // namespace shell |
171 } // namespace mojo | 169 } // namespace mojo |
OLD | NEW |