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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 service_manager_.SetLoaderForURL( | 144 service_manager_.SetLoaderForURL( |
145 scoped_ptr<ServiceLoader>( | 145 scoped_ptr<ServiceLoader>( |
146 new BackgroundServiceLoader( | 146 new BackgroundServiceLoader( |
147 scoped_ptr<ServiceLoader>(new NetworkServiceLoader()), | 147 scoped_ptr<ServiceLoader>(new NetworkServiceLoader()), |
148 "network_service", | 148 "network_service", |
149 base::MessageLoop::TYPE_IO)), | 149 base::MessageLoop::TYPE_IO)), |
150 GURL("mojo:mojo_network_service")); | 150 GURL("mojo:mojo_network_service")); |
151 #endif | 151 #endif |
152 } | 152 } |
153 | 153 |
154 Context::~Context() { | 154 void Context::Shutdown() { |
155 // mojo_view_manager uses native_viewport. Destroy mojo_view_manager first so | 155 // mojo_view_manager uses native_viewport. Destroy mojo_view_manager first so |
156 // that there aren't shutdown ordering issues. Once native viewport service is | 156 // that there aren't shutdown ordering issues. Once native viewport service is |
157 // moved into its own process this can likely be nuked. | 157 // moved into its own process this can likely be nuked. |
158 #if defined(USE_AURA) | 158 #if defined(USE_AURA) |
159 service_manager_.SetLoaderForURL( | 159 service_manager_.SetLoaderForURL( |
160 scoped_ptr<ServiceLoader>(), | 160 scoped_ptr<ServiceLoader>(), |
161 GURL("mojo:mojo_view_manager")); | 161 GURL("mojo:mojo_view_manager")); |
162 #endif | 162 #endif |
163 service_manager_.SetLoaderForURL(scoped_ptr<ServiceLoader>(), | |
164 GURL("mojo:profile_service")); | |
qsr
2014/07/21 08:09:20
This is probably outdated, the profile_service doe
tim (not reviewing)
2014/07/21 16:47:01
Oops, bad merge. Thanks!
| |
163 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); | 165 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); |
166 service_manager_.TerminateShellConnections(); | |
167 } | |
168 | |
169 Context::~Context() { | |
170 Shutdown(); | |
164 } | 171 } |
165 | 172 |
166 } // namespace shell | 173 } // namespace shell |
167 } // namespace mojo | 174 } // namespace mojo |
OLD | NEW |