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

Side by Side Diff: mojo/public/cpp/bindings/associated_binding_set.h

Issue 2692413002: Implements mojo::StrongBindingSet. (Closed)
Patch Set: Created 3 years, 10 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 #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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698