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

Unified Diff: mojo/public/cpp/bindings/associated_group.h

Issue 1524693002: [mojo] Add GenericInterface_ to interface class variants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindings-2-typemaps
Patch Set: Address moar comments Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/associated_binding.h ('k') | mojo/public/cpp/bindings/associated_interface_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/associated_group.h
diff --git a/mojo/public/cpp/bindings/associated_group.h b/mojo/public/cpp/bindings/associated_group.h
index b6934e09eb48728d380c728f15998b5c44b15d33..e46a73872a6750387b03b9ed6b9323a569032106 100644
--- a/mojo/public/cpp/bindings/associated_group.h
+++ b/mojo/public/cpp/bindings/associated_group.h
@@ -44,16 +44,17 @@ class AssociatedGroup {
// no need to wait until |request| is bound to an implementation at the remote
// side.
template <typename T>
- void CreateAssociatedInterface(AssociatedInterfaceConfig config,
- AssociatedInterfacePtrInfo<T>* ptr_info,
- AssociatedInterfaceRequest<T>* request) {
+ void CreateAssociatedInterface(
+ AssociatedInterfaceConfig config,
+ AssociatedInterfacePtrInfo<T>* ptr_info,
yzshen1 2015/12/14 23:58:26 ptr_info should use the same type as the request,
+ AssociatedInterfaceRequest<typename T::GenericInterface>* request) {
internal::ScopedInterfaceEndpointHandle local;
internal::ScopedInterfaceEndpointHandle remote;
CreateEndpointHandlePair(&local, &remote);
if (!local.is_valid() || !remote.is_valid()) {
*ptr_info = AssociatedInterfacePtrInfo<T>();
- *request = AssociatedInterfaceRequest<T>();
+ *request = AssociatedInterfaceRequest<typename T::GenericInterface>();
return;
}
« no previous file with comments | « mojo/public/cpp/bindings/associated_binding.h ('k') | mojo/public/cpp/bindings/associated_interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698