Index: mojo/public/cpp/bindings/lib/multiplex_router.h |
diff --git a/mojo/public/cpp/bindings/lib/multiplex_router.h b/mojo/public/cpp/bindings/lib/multiplex_router.h |
index c348c7d8954aed9e19d8f20e3346fa2f7e1bbb7b..f3ee51755908d5cd084c4bb2a4e7fee7a3d609e8 100644 |
--- a/mojo/public/cpp/bindings/lib/multiplex_router.h |
+++ b/mojo/public/cpp/bindings/lib/multiplex_router.h |
@@ -20,6 +20,7 @@ |
#include "base/synchronization/lock.h" |
#include "base/threading/thread_checker.h" |
#include "mojo/public/cpp/bindings/callback.h" |
+#include "mojo/public/cpp/bindings/error.h" |
#include "mojo/public/cpp/bindings/lib/connector.h" |
#include "mojo/public/cpp/bindings/lib/interface_id.h" |
#include "mojo/public/cpp/bindings/lib/message_header_validator.h" |
@@ -95,7 +96,7 @@ class MultiplexRouter |
// Raises an error on the underlying message pipe. It disconnects the pipe |
// and notifies all interfaces running on this pipe. |
- void RaiseError(); |
+ void RaiseError(Error error); |
std::unique_ptr<AssociatedGroup> CreateAssociatedGroup(); |
@@ -135,6 +136,9 @@ class MultiplexRouter |
// Whether there are any associated interfaces running currently. |
bool HasAssociatedEndpoints() const; |
+ // Sets the master interface name. Used only for debugging information. |
+ void SetMasterInterfaceName(const std::string& name); |
+ |
// Sets this object to testing mode. |
// In testing mode, the object doesn't disconnect the underlying message pipe |
// when it receives unexpected or invalid messages. |
@@ -162,7 +166,7 @@ class MultiplexRouter |
~MultiplexRouter() override; |
// MessageReceiver implementation: |
- bool Accept(Message* message) override; |
+ bool Accept(Message* message, Error* error) override; |
// PipeControlMessageHandlerDelegate implementation: |
bool OnPeerAssociatedEndpointClosed(InterfaceId id) override; |
@@ -223,7 +227,7 @@ class MultiplexRouter |
void UpdateEndpointStateMayRemove(InterfaceEndpoint* endpoint, |
EndpointStateUpdateType type); |
- void RaiseErrorInNonTestingMode(); |
+ void RaiseErrorInNonTestingMode(Error error); |
InterfaceEndpoint* FindOrInsertEndpoint(InterfaceId id, bool* inserted); |
@@ -243,6 +247,7 @@ class MultiplexRouter |
std::map<InterfaceId, scoped_refptr<InterfaceEndpoint>> endpoints_; |
uint32_t next_interface_id_value_; |
+ std::string master_interface_name_; |
std::deque<std::unique_ptr<Task>> tasks_; |
// It refers to tasks in |tasks_| and doesn't own any of them. |