Avi Drissman | d387f092 | 2022-09-14 20:51:31 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors |
Ken Rockot | 12a26a1 | 2019-04-19 22:14:35 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_RECEIVER_SET_H_ |
| 6 | #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_RECEIVER_SET_H_ |
| 7 | |
| 8 | #include "mojo/public/cpp/bindings/associated_receiver.h" |
Ken Rockot | 12a26a1 | 2019-04-19 22:14:35 | [diff] [blame] | 9 | #include "mojo/public/cpp/bindings/pending_associated_receiver.h" |
| 10 | #include "mojo/public/cpp/bindings/receiver_set.h" |
| 11 | |
| 12 | namespace mojo { |
| 13 | |
| 14 | template <typename Interface, typename ImplRefTraits> |
| 15 | struct ReceiverSetTraits<AssociatedReceiver<Interface, ImplRefTraits>> { |
| 16 | using InterfaceType = Interface; |
| 17 | using PendingType = PendingAssociatedReceiver<Interface>; |
| 18 | using ImplPointerType = typename ImplRefTraits::PointerType; |
| 19 | }; |
| 20 | |
| 21 | template <typename Interface, typename ContextType = void> |
| 22 | using AssociatedReceiverSet = |
| 23 | ReceiverSetBase<AssociatedReceiver<Interface>, ContextType>; |
| 24 | |
| 25 | } // namespace mojo |
| 26 | |
| 27 | #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_RECEIVER_SET_H_ |