| 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_INTERFACE_ENDPOINT_CLIENT_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 DCHECK(thread_checker_.CalledOnValidThread()); | 70 DCHECK(thread_checker_.CalledOnValidThread()); |
| 71 return encountered_error_; | 71 return encountered_error_; |
| 72 } | 72 } |
| 73 | 73 |
| 74 // Returns true if this endpoint has any pending callbacks. | 74 // Returns true if this endpoint has any pending callbacks. |
| 75 bool has_pending_responders() const { | 75 bool has_pending_responders() const { |
| 76 DCHECK(thread_checker_.CalledOnValidThread()); | 76 DCHECK(thread_checker_.CalledOnValidThread()); |
| 77 return !async_responders_.empty() || !sync_responses_.empty(); | 77 return !async_responders_.empty() || !sync_responses_.empty(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 size_t pending_responder_count() const { |
| 81 DCHECK(thread_checker_.CalledOnValidThread()); |
| 82 return async_responders_.size(); |
| 83 } |
| 84 |
| 80 AssociatedGroupController* group_controller() const { | 85 AssociatedGroupController* group_controller() const { |
| 81 return handle_.group_controller(); | 86 return handle_.group_controller(); |
| 82 } | 87 } |
| 83 AssociatedGroup* associated_group(); | 88 AssociatedGroup* associated_group(); |
| 84 uint32_t interface_id() const; | 89 uint32_t interface_id() const; |
| 85 | 90 |
| 86 // Adds a MessageReceiver which can filter a message after validation but | 91 // Adds a MessageReceiver which can filter a message after validation but |
| 87 // before dispatch. | 92 // before dispatch. |
| 88 void AddFilter(std::unique_ptr<MessageReceiver> filter); | 93 void AddFilter(std::unique_ptr<MessageReceiver> filter); |
| 89 | 94 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 base::ThreadChecker thread_checker_; | 186 base::ThreadChecker thread_checker_; |
| 182 | 187 |
| 183 base::WeakPtrFactory<InterfaceEndpointClient> weak_ptr_factory_; | 188 base::WeakPtrFactory<InterfaceEndpointClient> weak_ptr_factory_; |
| 184 | 189 |
| 185 DISALLOW_COPY_AND_ASSIGN(InterfaceEndpointClient); | 190 DISALLOW_COPY_AND_ASSIGN(InterfaceEndpointClient); |
| 186 }; | 191 }; |
| 187 | 192 |
| 188 } // namespace mojo | 193 } // namespace mojo |
| 189 | 194 |
| 190 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ | 195 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ |
| OLD | NEW |