summaryrefslogtreecommitdiffstats
path: root/mojo/public/cpp/bindings/lib/multiplex_router.h
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/public/cpp/bindings/lib/multiplex_router.h')
-rw-r--r--mojo/public/cpp/bindings/lib/multiplex_router.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/mojo/public/cpp/bindings/lib/multiplex_router.h b/mojo/public/cpp/bindings/lib/multiplex_router.h
index f66d202..a8bf9b5 100644
--- a/mojo/public/cpp/bindings/lib/multiplex_router.h
+++ b/mojo/public/cpp/bindings/lib/multiplex_router.h
@@ -27,6 +27,10 @@
#include "mojo/public/cpp/bindings/lib/pipe_control_message_proxy.h"
#include "mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.h"
+namespace base {
+class SingleThreadTaskRunner;
+}
+
namespace mojo {
class AssociatedGroup;
@@ -172,11 +176,11 @@ class MultiplexRouter
// on to a ref outside of |lock_| before calling this method.
void ProcessTasks(bool force_async);
- // Returns true to indicate that |task| has been processed. Otherwise the task
- // will be added back to the front of the queue.
+ // Returns true to indicate that |task|/|message| has been processed.
bool ProcessNotifyErrorTask(Task* task, bool force_async);
- bool ProcessIncomingMessageTask(Task* task, bool force_async);
+ bool ProcessIncomingMessage(Message* message, bool force_async);
+ void MaybePostToProcessTasks(base::SingleThreadTaskRunner* task_runner);
void LockAndCallProcessTasks();
// Updates the state of |endpoint|. If both the endpoint and its peer have
@@ -188,6 +192,8 @@ class MultiplexRouter
void RaiseErrorInNonTestingMode();
+ InterfaceEndpoint* FindOrInsertEndpoint(InterfaceId id, bool* inserted);
+
// Whether to set the namespace bit when generating interface IDs. Please see
// comments of kInterfaceIdNamespaceMask.
const bool set_interface_id_namespace_bit_;
@@ -208,6 +214,8 @@ class MultiplexRouter
std::deque<scoped_ptr<Task>> tasks_;
+ bool posted_to_process_tasks_;
+
bool testing_mode_;
DISALLOW_COPY_AND_ASSIGN(MultiplexRouter);