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(); |