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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 service_manager_.set_default_loader( | 93 service_manager_.set_default_loader( |
94 scoped_ptr<ServiceLoader>( | 94 scoped_ptr<ServiceLoader>( |
95 new DynamicServiceLoader(this, runner_factory.Pass()))); | 95 new DynamicServiceLoader(this, runner_factory.Pass()))); |
96 // The native viewport service synchronously waits for certain messages. If we | 96 // The native viewport service synchronously waits for certain messages. If we |
97 // don't run it on its own thread we can easily deadlock. Long term native | 97 // don't run it on its own thread we can easily deadlock. Long term native |
98 // viewport should run its own process so that this isn't an issue. | 98 // viewport should run its own process so that this isn't an issue. |
99 service_manager_.SetLoaderForURL( | 99 service_manager_.SetLoaderForURL( |
100 scoped_ptr<ServiceLoader>( | 100 scoped_ptr<ServiceLoader>( |
101 new BackgroundServiceLoader( | 101 new BackgroundServiceLoader( |
102 scoped_ptr<ServiceLoader>(new NativeViewportServiceLoader(this)), | 102 scoped_ptr<ServiceLoader>(new NativeViewportServiceLoader(this)), |
103 "native_viewport")), | 103 "native_viewport", |
| 104 base::MessageLoop::TYPE_UI)), |
104 GURL("mojo:mojo_native_viewport_service")); | 105 GURL("mojo:mojo_native_viewport_service")); |
105 #if defined(USE_AURA) | 106 #if defined(USE_AURA) |
106 // TODO(sky): need a better way to find this. It shouldn't be linked in. | 107 // TODO(sky): need a better way to find this. It shouldn't be linked in. |
107 service_manager_.SetLoaderForURL( | 108 service_manager_.SetLoaderForURL( |
108 scoped_ptr<ServiceLoader>(new ViewManagerLoader()), | 109 scoped_ptr<ServiceLoader>(new ViewManagerLoader()), |
109 GURL("mojo:mojo_view_manager")); | 110 GURL("mojo:mojo_view_manager")); |
110 #endif | 111 #endif |
111 | 112 |
112 #if defined(OS_LINUX) | 113 #if defined(OS_LINUX) |
113 service_manager_.SetLoaderForScheme( | 114 service_manager_.SetLoaderForScheme( |
(...skipping 14 matching lines...) Expand all Loading... |
128 #if defined(USE_AURA) | 129 #if defined(USE_AURA) |
129 service_manager_.SetLoaderForURL( | 130 service_manager_.SetLoaderForURL( |
130 scoped_ptr<ServiceLoader>(), | 131 scoped_ptr<ServiceLoader>(), |
131 GURL("mojo:mojo_view_manager")); | 132 GURL("mojo:mojo_view_manager")); |
132 #endif | 133 #endif |
133 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); | 134 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); |
134 } | 135 } |
135 | 136 |
136 } // namespace shell | 137 } // namespace shell |
137 } // namespace mojo | 138 } // namespace mojo |
OLD | NEW |