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

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

Issue 1473273003: Mojo C++ bindings: InterfacePtr<T> and Binding<T> use MultiplexRouter when T passes associated inte… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « mojo/public/cpp/bindings/BUILD.gn ('k') | mojo/public/cpp/bindings/binding.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_INTERFACE_PTR_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_H_
7 7
8 #include <algorithm> 8 #include "base/logging.h"
9
10 #include "base/macros.h" 9 #include "base/macros.h"
11 #include "mojo/public/cpp/bindings/associated_group.h" 10 #include "mojo/public/cpp/bindings/associated_group.h"
12 #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h" 11 #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h"
13 #include "mojo/public/cpp/bindings/associated_interface_request.h" 12 #include "mojo/public/cpp/bindings/associated_interface_request.h"
14 #include "mojo/public/cpp/bindings/callback.h" 13 #include "mojo/public/cpp/bindings/callback.h"
15 #include "mojo/public/cpp/bindings/lib/associated_interface_ptr_internal.h" 14 #include "mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h"
16 15
17 namespace mojo { 16 namespace mojo {
18 17
19 // Represents the client side of an associated interface. It is similar to 18 // Represents the client side of an associated interface. It is similar to
20 // InterfacePtr, except that it doesn't own a message pipe handle. 19 // InterfacePtr, except that it doesn't own a message pipe handle.
21 template <typename Interface> 20 template <typename Interface>
22 class AssociatedInterfacePtr { 21 class AssociatedInterfacePtr {
23 MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(AssociatedInterfacePtr) 22 MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(AssociatedInterfacePtr)
24 23
25 public: 24 public:
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 group->CreateAssociatedInterface(AssociatedGroup::WILL_PASS_REQUEST, 181 group->CreateAssociatedInterface(AssociatedGroup::WILL_PASS_REQUEST,
183 &ptr_info, &request); 182 &ptr_info, &request);
184 183
185 ptr->Bind(ptr_info.Pass()); 184 ptr->Bind(ptr_info.Pass());
186 return request.Pass(); 185 return request.Pass();
187 } 186 }
188 187
189 } // namespace mojo 188 } // namespace mojo
190 189
191 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_H_ 190 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/BUILD.gn ('k') | mojo/public/cpp/bindings/binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698