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

Unified Diff: content/child/child_thread.h

Issue 382333002: Introduce ChannelMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
Index: content/child/child_thread.h
diff --git a/content/child/child_thread.h b/content/child/child_thread.h
index 8bad5ef0c91dbfc8bb37126fb81b6f28e93b0b8b..88b52abecde5395c969997ce871c2705315c5ac7 100644
--- a/content/child/child_thread.h
+++ b/content/child/child_thread.h
@@ -53,10 +53,20 @@ struct RequestInfo;
// The main thread of a child process derives from this class.
class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
public:
+ struct CONTENT_EXPORT Options {
+ Options();
+ explicit Options(bool mojo);
+ Options(std::string name, bool mojo)
+ : channel_name(name), use_mojo_channel(mojo) {}
+
+ std::string channel_name;
+ bool use_mojo_channel;
+ };
+
// Creates the thread.
ChildThread();
// Used for single-process mode and for in process gpu mode.
- explicit ChildThread(const std::string& channel_name);
+ explicit ChildThread(const Options& options);
// ChildProcess::main_thread() is reset after Shutdown(), and before the
// destructor, so any subsystem that relies on ChildProcess::main_thread()
// must be terminated before Shutdown returns. In particular, if a subsystem
@@ -173,7 +183,8 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
IPC::Sender* const sender_;
};
- void Init();
+ void Init(const Options& options);
+ scoped_ptr<IPC::SyncChannel> CreateChannel(bool use_mojo_channel);
// IPC message handlers.
void OnShutdown();

Powered by Google App Engine
This is Rietveld 408576698