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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 class ApplicationManager::ContentHandlerConnection { | 61 class ApplicationManager::ContentHandlerConnection { |
62 public: | 62 public: |
63 ContentHandlerConnection(ApplicationManager* manager, Identity identity) | 63 ContentHandlerConnection(ApplicationManager* manager, Identity identity) |
64 : manager_(manager), identity_(identity) { | 64 : manager_(manager), identity_(identity) { |
65 ServiceProviderPtr services; | 65 ServiceProviderPtr services; |
66 manager->ConnectToApplication(identity_.url, GURL(), | 66 manager->ConnectToApplication(identity_.url, GURL(), |
67 mojo::GetProxy(&services), nullptr, | 67 mojo::GetProxy(&services), nullptr, |
68 base::Closure()); | 68 base::Closure()); |
69 mojo::MessagePipe pipe; | 69 mojo::MessagePipe pipe; |
70 content_handler_.Bind( | 70 content_handler_.Bind( |
71 mojo::InterfacePtrInfo<mojo::ContentHandler>(pipe.handle0.Pass(), 0u)); | 71 mojo::InterfaceHandle<mojo::ContentHandler>(pipe.handle0.Pass(), 0u)); |
72 services->ConnectToService(mojo::ContentHandler::Name_, | 72 services->ConnectToService(mojo::ContentHandler::Name_, |
73 pipe.handle1.Pass()); | 73 pipe.handle1.Pass()); |
74 content_handler_.set_connection_error_handler( | 74 content_handler_.set_connection_error_handler( |
75 [this]() { manager_->OnContentHandlerError(this); }); | 75 [this]() { manager_->OnContentHandlerError(this); }); |
76 } | 76 } |
77 ~ContentHandlerConnection() {} | 77 ~ContentHandlerConnection() {} |
78 | 78 |
79 mojo::ContentHandler* content_handler() { return content_handler_.get(); } | 79 mojo::ContentHandler* content_handler() { return content_handler_.get(); } |
80 | 80 |
81 const GURL& content_handler_url() const { return identity_.url; } | 81 const GURL& content_handler_url() const { return identity_.url; } |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 return args_it->second; | 551 return args_it->second; |
552 return std::vector<std::string>(); | 552 return std::vector<std::string>(); |
553 } | 553 } |
554 | 554 |
555 void ApplicationManager::CleanupRunner(NativeRunner* runner) { | 555 void ApplicationManager::CleanupRunner(NativeRunner* runner) { |
556 native_runners_.erase( | 556 native_runners_.erase( |
557 std::find(native_runners_.begin(), native_runners_.end(), runner)); | 557 std::find(native_runners_.begin(), native_runners_.end(), runner)); |
558 } | 558 } |
559 | 559 |
560 } // namespace shell | 560 } // namespace shell |
OLD | NEW |