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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
14 #include "mojo/embedder/embedder.h" | 14 #include "mojo/embedder/embedder.h" |
15 #include "mojo/gles2/gles2_support_impl.h" | |
16 #include "mojo/public/cpp/application/application_impl.h" | 15 #include "mojo/public/cpp/application/application_impl.h" |
17 #include "mojo/service_manager/background_shell_service_loader.h" | 16 #include "mojo/service_manager/background_shell_service_loader.h" |
18 #include "mojo/service_manager/service_loader.h" | 17 #include "mojo/service_manager/service_loader.h" |
19 #include "mojo/service_manager/service_manager.h" | 18 #include "mojo/service_manager/service_manager.h" |
20 #include "mojo/services/native_viewport/native_viewport_service.h" | 19 #include "mojo/services/native_viewport/native_viewport_service.h" |
21 #include "mojo/shell/dynamic_service_loader.h" | 20 #include "mojo/shell/dynamic_service_loader.h" |
22 #include "mojo/shell/in_process_dynamic_service_runner.h" | 21 #include "mojo/shell/in_process_dynamic_service_runner.h" |
23 #include "mojo/shell/out_of_process_dynamic_service_runner.h" | 22 #include "mojo/shell/out_of_process_dynamic_service_runner.h" |
24 #include "mojo/shell/switches.h" | 23 #include "mojo/shell/switches.h" |
25 #include "mojo/shell/ui_service_loader_android.h" | 24 #include "mojo/shell/ui_service_loader_android.h" |
(...skipping 19 matching lines...) Expand all Loading... |
45 // correspond to shared libraries bundled alongside the mojo_shell. | 44 // correspond to shared libraries bundled alongside the mojo_shell. |
46 const char* kLocalMojoURLs[] = { | 45 const char* kLocalMojoURLs[] = { |
47 "mojo:mojo_network_service", | 46 "mojo:mojo_network_service", |
48 }; | 47 }; |
49 | 48 |
50 // Used to ensure we only init once. | 49 // Used to ensure we only init once. |
51 class Setup { | 50 class Setup { |
52 public: | 51 public: |
53 Setup() { | 52 Setup() { |
54 embedder::Init(); | 53 embedder::Init(); |
55 gles2::GLES2SupportImpl::Init(); | |
56 } | 54 } |
57 | 55 |
58 ~Setup() { | 56 ~Setup() { |
59 } | 57 } |
60 | 58 |
61 private: | 59 private: |
62 DISALLOW_COPY_AND_ASSIGN(Setup); | 60 DISALLOW_COPY_AND_ASSIGN(Setup); |
63 }; | 61 }; |
64 | 62 |
65 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER; | 63 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 191 } |
194 #endif | 192 #endif |
195 } | 193 } |
196 | 194 |
197 Context::~Context() { | 195 Context::~Context() { |
198 DCHECK(!base::MessageLoop::current()); | 196 DCHECK(!base::MessageLoop::current()); |
199 } | 197 } |
200 | 198 |
201 } // namespace shell | 199 } // namespace shell |
202 } // namespace mojo | 200 } // namespace mojo |
OLD | NEW |