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

Side by Side Diff: content/public/common/associated_interface_provider.h

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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 #ifndef CONTENT_PUBLIC_COMMON_ASSOCIATED_INTERFACE_PROVIDER_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_ASSOCIATED_INTERFACE_PROVIDER_H_
6 #define CONTENT_PUBLIC_COMMON_ASSOCIATED_INTERFACE_PROVIDER_H_ 6 #define CONTENT_PUBLIC_COMMON_ASSOCIATED_INTERFACE_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 10 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
(...skipping 29 matching lines...) Expand all
40 mojo::ScopedInterfaceEndpointHandle handle) = 0; 40 mojo::ScopedInterfaceEndpointHandle handle) = 0;
41 41
42 // Returns an AssociatedGroup for the provider. This may be used to create 42 // Returns an AssociatedGroup for the provider. This may be used to create
43 // new associated endpoints for use with Channel-associated interfaces. 43 // new associated endpoints for use with Channel-associated interfaces.
44 virtual mojo::AssociatedGroup* GetAssociatedGroup() = 0; 44 virtual mojo::AssociatedGroup* GetAssociatedGroup() = 0;
45 45
46 // Templated helper for GetInterface(). 46 // Templated helper for GetInterface().
47 template <typename Interface> 47 template <typename Interface>
48 void GetInterface(mojo::AssociatedInterfacePtr<Interface>* proxy) { 48 void GetInterface(mojo::AssociatedInterfacePtr<Interface>* proxy) {
49 mojo::AssociatedInterfaceRequest<Interface> request = 49 mojo::AssociatedInterfaceRequest<Interface> request =
50 mojo::GetProxy(proxy, GetAssociatedGroup()); 50 mojo::MakeRequest(proxy, GetAssociatedGroup());
51 GetInterface(Interface::Name_, request.PassHandle()); 51 GetInterface(Interface::Name_, request.PassHandle());
52 } 52 }
53 53
54 virtual void OverrideBinderForTesting( 54 virtual void OverrideBinderForTesting(
55 const std::string& name, 55 const std::string& name,
56 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& 56 const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>&
57 binder) = 0; 57 binder) = 0;
58 }; 58 };
59 59
60 } // namespace content 60 } // namespace content
61 61
62 #endif // CONTENT_PUBLIC_COMMON_ASSOCIATED_INTERFACE_PROVIDER_H_ 62 #endif // CONTENT_PUBLIC_COMMON_ASSOCIATED_INTERFACE_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/public/browser/utility_process_mojo_client.h ('k') | content/public/test/mock_render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698