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 "shell/application_manager/application_manager.h" | 5 #include "shell/application_manager/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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class ApplicationManager::ContentHandlerConnection : public mojo::ErrorHandler { | 50 class ApplicationManager::ContentHandlerConnection : public mojo::ErrorHandler { |
51 public: | 51 public: |
52 ContentHandlerConnection(ApplicationManager* manager, | 52 ContentHandlerConnection(ApplicationManager* manager, |
53 const GURL& content_handler_url) | 53 const GURL& content_handler_url) |
54 : manager_(manager), content_handler_url_(content_handler_url) { | 54 : manager_(manager), content_handler_url_(content_handler_url) { |
55 ServiceProviderPtr services; | 55 ServiceProviderPtr services; |
56 manager->ConnectToApplication(content_handler_url, GURL(), | 56 manager->ConnectToApplication(content_handler_url, GURL(), |
57 mojo::GetProxy(&services), nullptr, | 57 mojo::GetProxy(&services), nullptr, |
58 base::Closure()); | 58 base::Closure()); |
59 mojo::MessagePipe pipe; | 59 mojo::MessagePipe pipe; |
60 content_handler_.Bind(pipe.handle0.Pass()); | 60 content_handler_.Bind( |
| 61 mojo::InterfacePtrInfo<mojo::ContentHandler>(pipe.handle0.Pass(), 0u)); |
61 services->ConnectToService(mojo::ContentHandler::Name_, | 62 services->ConnectToService(mojo::ContentHandler::Name_, |
62 pipe.handle1.Pass()); | 63 pipe.handle1.Pass()); |
63 content_handler_.set_error_handler(this); | 64 content_handler_.set_error_handler(this); |
64 } | 65 } |
65 | 66 |
66 mojo::ContentHandler* content_handler() { return content_handler_.get(); } | 67 mojo::ContentHandler* content_handler() { return content_handler_.get(); } |
67 | 68 |
68 GURL content_handler_url() { return content_handler_url_; } | 69 GURL content_handler_url() { return content_handler_url_; } |
69 | 70 |
70 private: | 71 private: |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 return args_it->second; | 495 return args_it->second; |
495 return std::vector<std::string>(); | 496 return std::vector<std::string>(); |
496 } | 497 } |
497 | 498 |
498 void ApplicationManager::CleanupRunner(NativeRunner* runner) { | 499 void ApplicationManager::CleanupRunner(NativeRunner* runner) { |
499 native_runners_.erase( | 500 native_runners_.erase( |
500 std::find(native_runners_.begin(), native_runners_.end(), runner)); | 501 std::find(native_runners_.begin(), native_runners_.end(), runner)); |
501 } | 502 } |
502 | 503 |
503 } // namespace shell | 504 } // namespace shell |
OLD | NEW |