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

Unified Diff: content/child/child_thread.h

Issue 382333002: Introduce ChannelMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed ChanelBuilder to ChannelFactory Created 6 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
Index: content/child/child_thread.h
diff --git a/content/child/child_thread.h b/content/child/child_thread.h
index e7cf8ec550ef2225cfe12bbf57c5cf0b1b6769c9..11671c73fabc4ce8270338a33168638c359329d2 100644
--- a/content/child/child_thread.h
+++ b/content/child/child_thread.h
@@ -57,10 +57,18 @@ 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 InitOptions {
darin (slow to review) 2014/07/23 23:03:33 nit: You could probably just call this Options, wh
Hajime Morrita 2014/07/24 00:38:44 Done.
+ explicit InitOptions(std::string name = "", bool mojo = false)
darin (slow to review) 2014/07/23 23:03:33 nit: Google C++ style recommends against using def
Hajime Morrita 2014/07/24 00:38:44 Done. I should re-read the coding guideline to unl
+ : 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 InitOptions& 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
@@ -181,7 +189,8 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
IPC::Sender* const sender_;
};
- void Init();
+ void Init(const InitOptions& options);
+ scoped_ptr<IPC::SyncChannel> CreateChannel(bool use_mojo_channel);
// IPC message handlers.
void OnShutdown();

Powered by Google App Engine
This is Rietveld 408576698