Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(918)

Side by Side Diff: content/common/associated_interface_provider_impl.cc

Issue 2705503002: Mojo C++ bindings: rename GetIsolatedProxy to MakeIsolatedRequest to better match other functions. (Closed)
Patch Set: . Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 : public mojom::AssociatedInterfaceProvider { 11 : public mojom::AssociatedInterfaceProvider {
12 public: 12 public:
13 explicit LocalProvider(mojom::AssociatedInterfaceProviderAssociatedPtr* proxy) 13 explicit LocalProvider(mojom::AssociatedInterfaceProviderAssociatedPtr* proxy)
14 : associated_interface_provider_binding_(this) { 14 : associated_interface_provider_binding_(this) {
15 associated_interface_provider_binding_.Bind( 15 associated_interface_provider_binding_.Bind(
16 mojo::MakeRequestForTesting(proxy)); 16 mojo::MakeIsolatedRequest(proxy));
17 } 17 }
18 18
19 ~LocalProvider() override {} 19 ~LocalProvider() override {}
20 20
21 void SetBinderForName( 21 void SetBinderForName(
22 const std::string& name, 22 const std::string& name,
23 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder) { 23 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder) {
24 binders_[name] = binder; 24 binders_[name] = binder;
25 } 25 }
26 26
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 void AssociatedInterfaceProviderImpl::OverrideBinderForTesting( 65 void AssociatedInterfaceProviderImpl::OverrideBinderForTesting(
66 const std::string& name, 66 const std::string& name,
67 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder) { 67 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder) {
68 DCHECK(local_provider_); 68 DCHECK(local_provider_);
69 local_provider_->SetBinderForName(name, binder); 69 local_provider_->SetBinderForName(name, binder);
70 } 70 }
71 71
72 } // namespace content 72 } // namespace content
OLDNEW
« no previous file with comments | « content/child/indexed_db/webidbcursor_impl_unittest.cc ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698