| 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 "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 #if defined(OS_LINUX) | 216 #if defined(OS_LINUX) |
| 217 application_manager_.SetLoaderForScheme( | 217 application_manager_.SetLoaderForScheme( |
| 218 scoped_ptr<ApplicationLoader>(new DBusApplicationLoader(this)), "dbus"); | 218 scoped_ptr<ApplicationLoader>(new DBusApplicationLoader(this)), "dbus"); |
| 219 #endif // defined(OS_LINUX) | 219 #endif // defined(OS_LINUX) |
| 220 | 220 |
| 221 if (command_line->HasSwitch(switches::kSpy)) { | 221 if (command_line->HasSwitch(switches::kSpy)) { |
| 222 spy_.reset( | 222 spy_.reset( |
| 223 new mojo::Spy(&application_manager_, | 223 new mojo::Spy(&application_manager_, |
| 224 command_line->GetSwitchValueASCII(switches::kSpy))); | 224 command_line->GetSwitchValueASCII(switches::kSpy))); |
| 225 // TODO(cpu): the spy can snoop, but can't tell anybody until |
| 226 // the Spy::WebSocketDelegate is implemented. In the original repo this |
| 227 // was implemented by src\mojo\spy\websocket_server.h and .cc. |
| 225 } | 228 } |
| 226 | 229 |
| 227 #if defined(OS_ANDROID) | 230 #if defined(OS_ANDROID) |
| 228 // On android, the network service is bundled with the shell because the | 231 // On android, the network service is bundled with the shell because the |
| 229 // network stack depends on the android runtime. | 232 // network stack depends on the android runtime. |
| 230 { | 233 { |
| 231 scoped_ptr<BackgroundShellApplicationLoader> loader( | 234 scoped_ptr<BackgroundShellApplicationLoader> loader( |
| 232 new BackgroundShellApplicationLoader( | 235 new BackgroundShellApplicationLoader( |
| 233 scoped_ptr<ApplicationLoader>(new NetworkApplicationLoader()), | 236 scoped_ptr<ApplicationLoader>(new NetworkApplicationLoader()), |
| 234 "network_service", | 237 "network_service", |
| (...skipping 27 matching lines...) Expand all Loading... |
| 262 ScopedMessagePipeHandle Context::ConnectToServiceByName( | 265 ScopedMessagePipeHandle Context::ConnectToServiceByName( |
| 263 const GURL& application_url, | 266 const GURL& application_url, |
| 264 const std::string& service_name) { | 267 const std::string& service_name) { |
| 265 app_urls_.insert(application_url); | 268 app_urls_.insert(application_url); |
| 266 return application_manager_.ConnectToServiceByName( | 269 return application_manager_.ConnectToServiceByName( |
| 267 application_url, service_name).Pass(); | 270 application_url, service_name).Pass(); |
| 268 } | 271 } |
| 269 | 272 |
| 270 } // namespace shell | 273 } // namespace shell |
| 271 } // namespace mojo | 274 } // namespace mojo |
| OLD | NEW |