| 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 27 matching lines...) Expand all Loading... |
| 38 const GURL& requestor_url, | 38 const GURL& requestor_url, |
| 39 const std::string& qualifier) | 39 const std::string& qualifier) |
| 40 : manager_(manager), | 40 : manager_(manager), |
| 41 content_handler_url_(content_handler_url), | 41 content_handler_url_(content_handler_url), |
| 42 content_handler_qualifier_(qualifier) { | 42 content_handler_qualifier_(qualifier) { |
| 43 ServiceProviderPtr services; | 43 ServiceProviderPtr services; |
| 44 manager->ConnectToApplicationWithParameters( | 44 manager->ConnectToApplicationWithParameters( |
| 45 content_handler_url, qualifier, requestor_url, GetProxy(&services), | 45 content_handler_url, qualifier, requestor_url, GetProxy(&services), |
| 46 nullptr, base::Closure(), std::vector<std::string>()); | 46 nullptr, base::Closure(), std::vector<std::string>()); |
| 47 MessagePipe pipe; | 47 MessagePipe pipe; |
| 48 content_handler_.Bind(pipe.handle0.Pass()); | 48 content_handler_.Bind( |
| 49 InterfacePtrInfo<ContentHandler>(pipe.handle0.Pass(), 0u)); |
| 49 services->ConnectToService(ContentHandler::Name_, pipe.handle1.Pass()); | 50 services->ConnectToService(ContentHandler::Name_, pipe.handle1.Pass()); |
| 50 content_handler_.set_error_handler(this); | 51 content_handler_.set_error_handler(this); |
| 51 } | 52 } |
| 52 | 53 |
| 53 ContentHandler* content_handler() { return content_handler_.get(); } | 54 ContentHandler* content_handler() { return content_handler_.get(); } |
| 54 | 55 |
| 55 GURL content_handler_url() { return content_handler_url_; } | 56 GURL content_handler_url() { return content_handler_url_; } |
| 56 std::string content_handler_qualifier() { return content_handler_qualifier_; } | 57 std::string content_handler_qualifier() { return content_handler_qualifier_; } |
| 57 | 58 |
| 58 private: | 59 private: |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 return pipe.handle0.Pass(); | 522 return pipe.handle0.Pass(); |
| 522 } | 523 } |
| 523 | 524 |
| 524 void ApplicationManager::CleanupRunner(NativeRunner* runner) { | 525 void ApplicationManager::CleanupRunner(NativeRunner* runner) { |
| 525 native_runners_.erase( | 526 native_runners_.erase( |
| 526 std::find(native_runners_.begin(), native_runners_.end(), runner)); | 527 std::find(native_runners_.begin(), native_runners_.end(), runner)); |
| 527 } | 528 } |
| 528 | 529 |
| 529 } // namespace shell | 530 } // namespace shell |
| 530 } // namespace mojo | 531 } // namespace mojo |
| OLD | NEW |