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

Unified Diff: ipc/ipc_channel_mojo.h

Issue 2159293002: Plumb explicit IPC task runner through to IPC::Channel creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add dcheck Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_channel_factory.cc ('k') | ipc/ipc_channel_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_mojo.h
diff --git a/ipc/ipc_channel_mojo.h b/ipc/ipc_channel_mojo.h
index 7a35ee7e9bc761468d7c3f5099ff7c8c004b87d7..940dcf0bbb085a3f32f39a9931366c82a925c6e7 100644
--- a/ipc/ipc_channel_mojo.h
+++ b/ipc/ipc_channel_mojo.h
@@ -16,8 +16,10 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_factory.h"
@@ -45,16 +47,22 @@ class IPC_EXPORT ChannelMojo
public:
// Creates a ChannelMojo.
static std::unique_ptr<ChannelMojo>
- Create(mojo::ScopedMessagePipeHandle handle, Mode mode, Listener* listener);
+ Create(mojo::ScopedMessagePipeHandle handle,
+ Mode mode,
+ Listener* listener,
+ const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner =
+ base::ThreadTaskRunnerHandle::Get());
// Create a factory object for ChannelMojo.
// The factory is used to create Mojo-based ChannelProxy family.
// |host| must not be null.
static std::unique_ptr<ChannelFactory> CreateServerFactory(
- mojo::ScopedMessagePipeHandle handle);
+ mojo::ScopedMessagePipeHandle handle,
+ const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner);
static std::unique_ptr<ChannelFactory> CreateClientFactory(
- mojo::ScopedMessagePipeHandle handle);
+ mojo::ScopedMessagePipeHandle handle,
+ const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner);
~ChannelMojo() override;
@@ -95,9 +103,11 @@ class IPC_EXPORT ChannelMojo
void OnPipeError() override;
private:
- ChannelMojo(mojo::ScopedMessagePipeHandle handle,
- Mode mode,
- Listener* listener);
+ ChannelMojo(
+ mojo::ScopedMessagePipeHandle handle,
+ Mode mode,
+ Listener* listener,
+ const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner);
void InitMessageReader(mojom::ChannelAssociatedPtrInfo sender,
mojom::ChannelAssociatedRequest receiver,
« no previous file with comments | « ipc/ipc_channel_factory.cc ('k') | ipc/ipc_channel_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698