OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/common/service_manager/service_manager_connection_impl.h" | 5 #include "content/common/service_manager/service_manager_connection_impl.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 for (auto& entry : connection_filters_) { | 251 for (auto& entry : connection_filters_) { |
252 accept |= entry.second->OnConnect(remote_info.identity, registry, | 252 accept |= entry.second->OnConnect(remote_info.identity, registry, |
253 service_context_->connector()); | 253 service_context_->connector()); |
254 } | 254 } |
255 } | 255 } |
256 | 256 |
257 if (remote_service == "service:content_browser" && | 257 if (remote_service == "service:content_browser" && |
258 !has_browser_connection_) { | 258 !has_browser_connection_) { |
259 has_browser_connection_ = true; | 259 has_browser_connection_ = true; |
260 registry->set_default_binder(default_browser_binder_); | 260 registry->set_default_binder(default_browser_binder_); |
261 registry->SetConnectionLostClosure( | 261 registry->AddConnectionLostClosure( |
262 base::Bind(&IOThreadContext::OnBrowserConnectionLost, this)); | 262 base::Bind(&IOThreadContext::OnBrowserConnectionLost, this)); |
263 return true; | 263 return true; |
264 } | 264 } |
265 | 265 |
266 // If no filters were interested, reject the connection. | 266 // If no filters were interested, reject the connection. |
267 return accept; | 267 return accept; |
268 } | 268 } |
269 | 269 |
270 bool OnStop() override { | 270 bool OnStop() override { |
271 ClearConnectionFiltersOnIOThread(); | 271 ClearConnectionFiltersOnIOThread(); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 | 536 |
537 void ServiceManagerConnectionImpl::GetInterface( | 537 void ServiceManagerConnectionImpl::GetInterface( |
538 service_manager::mojom::InterfaceProvider* provider, | 538 service_manager::mojom::InterfaceProvider* provider, |
539 const std::string& interface_name, | 539 const std::string& interface_name, |
540 mojo::ScopedMessagePipeHandle request_handle) { | 540 mojo::ScopedMessagePipeHandle request_handle) { |
541 provider->GetInterface(interface_name, std::move(request_handle)); | 541 provider->GetInterface(interface_name, std::move(request_handle)); |
542 } | 542 } |
543 | 543 |
544 } // namespace content | 544 } // namespace content |
545 | 545 |
OLD | NEW |