OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/application_manager.h" | 5 #include "mojo/shell/application_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 DVLOG(2) << "Applying stored native options to resolved URL " | 376 DVLOG(2) << "Applying stored native options to resolved URL " |
377 << fetcher->GetURL(); | 377 << fetcher->GetURL(); |
378 options = url_to_native_options_[base_resolved_url]; | 378 options = url_to_native_options_[base_resolved_url]; |
379 } | 379 } |
380 | 380 |
381 // TODO(erg): Have a better way of switching the sandbox on. For now, switch | 381 // TODO(erg): Have a better way of switching the sandbox on. For now, switch |
382 // it on hard coded when we're using some of the sandboxable core services. | 382 // it on hard coded when we're using some of the sandboxable core services. |
383 bool start_sandboxed = false; | 383 bool start_sandboxed = false; |
384 if (app_url == GURL("mojo://core_services/") && qualifier == "Sandboxed Core") | 384 if (app_url == GURL("mojo://core_services/") && qualifier == "Sandboxed Core") |
385 start_sandboxed = true; | 385 start_sandboxed = true; |
386 else if (app_url == GURL("mojo://html_viewer/")) | |
387 start_sandboxed = true; | |
388 | 386 |
389 fetcher->AsPath(blocking_pool_, | 387 fetcher->AsPath(blocking_pool_, |
390 base::Bind(&ApplicationManager::RunNativeApplication, | 388 base::Bind(&ApplicationManager::RunNativeApplication, |
391 weak_ptr_factory_.GetWeakPtr(), | 389 weak_ptr_factory_.GetWeakPtr(), |
392 base::Passed(request.Pass()), start_sandboxed, | 390 base::Passed(request.Pass()), start_sandboxed, |
393 options, cleanup, base::Passed(fetcher.Pass()))); | 391 options, cleanup, base::Passed(fetcher.Pass()))); |
394 } | 392 } |
395 | 393 |
396 void ApplicationManager::RunNativeApplication( | 394 void ApplicationManager::RunNativeApplication( |
397 InterfaceRequest<Application> application_request, | 395 InterfaceRequest<Application> application_request, |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 ConnectToApplication(nullptr, request.Pass(), std::string(), GURL(), | 541 ConnectToApplication(nullptr, request.Pass(), std::string(), GURL(), |
544 GetProxy(&services), nullptr, | 542 GetProxy(&services), nullptr, |
545 GetPermissiveCapabilityFilter(), base::Closure()); | 543 GetPermissiveCapabilityFilter(), base::Closure()); |
546 MessagePipe pipe; | 544 MessagePipe pipe; |
547 services->ConnectToService(interface_name, pipe.handle1.Pass()); | 545 services->ConnectToService(interface_name, pipe.handle1.Pass()); |
548 return pipe.handle0.Pass(); | 546 return pipe.handle0.Pass(); |
549 } | 547 } |
550 | 548 |
551 } // namespace shell | 549 } // namespace shell |
552 } // namespace mojo | 550 } // namespace mojo |
OLD | NEW |