OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_instance.h" | 5 #include "mojo/shell/application_instance.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 void ApplicationInstance::BindPIDReceiver( | 72 void ApplicationInstance::BindPIDReceiver( |
73 InterfaceRequest<mojom::PIDReceiver> pid_receiver) { | 73 InterfaceRequest<mojom::PIDReceiver> pid_receiver) { |
74 pid_receiver_binding_.Bind(std::move(pid_receiver)); | 74 pid_receiver_binding_.Bind(std::move(pid_receiver)); |
75 } | 75 } |
76 | 76 |
77 // Shell implementation: | 77 // Shell implementation: |
78 void ApplicationInstance::ConnectToApplication( | 78 void ApplicationInstance::ConnectToApplication( |
79 URLRequestPtr app_request, | 79 URLRequestPtr app_request, |
80 InterfaceRequest<InterfaceProvider> remote_interfaces, | 80 shell::mojom::InterfaceProviderRequest remote_interfaces, |
81 InterfaceProviderPtr local_interfaces, | 81 shell::mojom::InterfaceProviderPtr local_interfaces, |
82 mojom::CapabilityFilterPtr filter, | 82 mojom::CapabilityFilterPtr filter, |
83 const ConnectToApplicationCallback& callback) { | 83 const ConnectToApplicationCallback& callback) { |
84 std::string url_string = app_request->url.To<std::string>(); | 84 std::string url_string = app_request->url.To<std::string>(); |
85 GURL url(url_string); | 85 GURL url(url_string); |
86 if (!url.is_valid()) { | 86 if (!url.is_valid()) { |
87 LOG(ERROR) << "Error: invalid URL: " << url_string; | 87 LOG(ERROR) << "Error: invalid URL: " << url_string; |
88 callback.Run(kInvalidApplicationID, kInvalidApplicationID); | 88 callback.Run(kInvalidApplicationID, kInvalidApplicationID); |
89 return; | 89 return; |
90 } | 90 } |
91 if (allow_any_application_ || | 91 if (allow_any_application_ || |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 queue_requests_ = false; | 192 queue_requests_ = false; |
193 for (auto request : queued_client_requests_) | 193 for (auto request : queued_client_requests_) |
194 CallAcceptConnection(make_scoped_ptr(request)); | 194 CallAcceptConnection(make_scoped_ptr(request)); |
195 | 195 |
196 queued_client_requests_.clear(); | 196 queued_client_requests_.clear(); |
197 } | 197 } |
198 | 198 |
199 } // namespace shell | 199 } // namespace shell |
200 } // namespace mojo | 200 } // namespace mojo |
OLD | NEW |