| 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/associated_interface_provider_impl.h" | 5 #include "content/common/associated_interface_provider_impl.h" |
| 6 #include "mojo/public/cpp/bindings/associated_binding.h" | 6 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 7 | 7 |
| 8 namespace content { | 8 namespace content { |
| 9 | 9 |
| 10 class AssociatedInterfaceProviderImpl::LocalProvider | 10 class AssociatedInterfaceProviderImpl::LocalProvider |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 AssociatedInterfaceProviderImpl::~AssociatedInterfaceProviderImpl() {} | 55 AssociatedInterfaceProviderImpl::~AssociatedInterfaceProviderImpl() {} |
| 56 | 56 |
| 57 void AssociatedInterfaceProviderImpl::GetInterface( | 57 void AssociatedInterfaceProviderImpl::GetInterface( |
| 58 const std::string& name, | 58 const std::string& name, |
| 59 mojo::ScopedInterfaceEndpointHandle handle) { | 59 mojo::ScopedInterfaceEndpointHandle handle) { |
| 60 mojom::AssociatedInterfaceAssociatedRequest request; | 60 mojom::AssociatedInterfaceAssociatedRequest request; |
| 61 request.Bind(std::move(handle)); | 61 request.Bind(std::move(handle)); |
| 62 return proxy_->GetAssociatedInterface(name, std::move(request)); | 62 return proxy_->GetAssociatedInterface(name, std::move(request)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 mojo::AssociatedGroup* AssociatedInterfaceProviderImpl::GetAssociatedGroup() { | |
| 66 return proxy_.associated_group(); | |
| 67 } | |
| 68 | |
| 69 void AssociatedInterfaceProviderImpl::OverrideBinderForTesting( | 65 void AssociatedInterfaceProviderImpl::OverrideBinderForTesting( |
| 70 const std::string& name, | 66 const std::string& name, |
| 71 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder) { | 67 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder) { |
| 72 DCHECK(local_provider_); | 68 DCHECK(local_provider_); |
| 73 local_provider_->SetBinderForName(name, binder); | 69 local_provider_->SetBinderForName(name, binder); |
| 74 } | 70 } |
| 75 | 71 |
| 76 } // namespace content | 72 } // namespace content |
| OLD | NEW |