| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |