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

Side by Side Diff: mojo/public/cpp/bindings/lib/binding_state.h

Issue 1713203002: Mojo C++ bindings: support sync methods - part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « mojo/public/cpp/bindings/BUILD.gn ('k') | mojo/public/cpp/bindings/lib/connector.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_LIB_BINDING_STATE_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 if (router_) 49 if (router_)
50 Close(); 50 Close();
51 } 51 }
52 52
53 void Bind(ScopedMessagePipeHandle handle, const MojoAsyncWaiter* waiter) { 53 void Bind(ScopedMessagePipeHandle handle, const MojoAsyncWaiter* waiter) {
54 DCHECK(!router_); 54 DCHECK(!router_);
55 internal::FilterChain filters; 55 internal::FilterChain filters;
56 filters.Append<internal::MessageHeaderValidator>(); 56 filters.Append<internal::MessageHeaderValidator>();
57 filters.Append<typename Interface::RequestValidator_>(); 57 filters.Append<typename Interface::RequestValidator_>();
58 58
59 router_ = 59 router_ = new internal::Router(std::move(handle), std::move(filters),
60 new internal::Router(std::move(handle), std::move(filters), waiter); 60 Interface::HasSyncMethods_, waiter);
61 router_->set_incoming_receiver(&stub_); 61 router_->set_incoming_receiver(&stub_);
62 router_->set_connection_error_handler( 62 router_->set_connection_error_handler(
63 [this]() { connection_error_handler_.Run(); }); 63 [this]() { connection_error_handler_.Run(); });
64 } 64 }
65 65
66 bool HasAssociatedInterfaces() const { return false; } 66 bool HasAssociatedInterfaces() const { return false; }
67 67
68 void PauseIncomingMethodCallProcessing() { 68 void PauseIncomingMethodCallProcessing() {
69 DCHECK(router_); 69 DCHECK(router_);
70 router_->PauseIncomingMethodCallProcessing(); 70 router_->PauseIncomingMethodCallProcessing();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 Interface* impl_; 227 Interface* impl_;
228 Closure connection_error_handler_; 228 Closure connection_error_handler_;
229 229
230 DISALLOW_COPY_AND_ASSIGN(BindingState); 230 DISALLOW_COPY_AND_ASSIGN(BindingState);
231 }; 231 };
232 232
233 } // namesapce internal 233 } // namesapce internal
234 } // namespace mojo 234 } // namespace mojo
235 235
236 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ 236 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/BUILD.gn ('k') | mojo/public/cpp/bindings/lib/connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698