| 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 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_SET_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_SET_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_SET_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_SET_H_ |
| 7 | 7 |
| 8 #include "mojo/public/cpp/bindings/associated_binding.h" | 8 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 9 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" | 9 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
| 10 #include "mojo/public/cpp/bindings/associated_interface_request.h" | 10 #include "mojo/public/cpp/bindings/associated_interface_request.h" |
| 11 #include "mojo/public/cpp/bindings/binding_set.h" | 11 #include "mojo/public/cpp/bindings/binding_set.h" |
| 12 | 12 |
| 13 namespace mojo { | 13 namespace mojo { |
| 14 | 14 |
| 15 template <typename Interface> | 15 template <typename Interface, typename ImplRefTraits> |
| 16 struct BindingSetTraits<AssociatedBinding<Interface>> { | 16 struct BindingSetTraits<AssociatedBinding<Interface, ImplRefTraits>> { |
| 17 using ProxyType = AssociatedInterfacePtr<Interface>; | 17 using ProxyType = AssociatedInterfacePtr<Interface>; |
| 18 using RequestType = AssociatedInterfaceRequest<Interface>; | 18 using RequestType = AssociatedInterfaceRequest<Interface>; |
| 19 using BindingType = AssociatedBinding<Interface, ImplRefTraits>; |
| 20 using ImplPointerType = typename BindingType::ImplPointerType; |
| 19 }; | 21 }; |
| 20 | 22 |
| 21 template <typename Interface, typename ContextType = void> | 23 template <typename Interface, typename ContextType = void> |
| 22 using AssociatedBindingSet = | 24 using AssociatedBindingSet = |
| 23 BindingSetBase<Interface, AssociatedBinding<Interface>, ContextType>; | 25 BindingSetBase<Interface, AssociatedBinding<Interface>, ContextType>; |
| 24 | 26 |
| 25 } // namespace mojo | 27 } // namespace mojo |
| 26 | 28 |
| 27 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_SET_H_ | 29 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_SET_H_ |
| OLD | NEW |