Index: content/child/child_thread_impl.h |
diff --git a/content/child/child_thread_impl.h b/content/child/child_thread_impl.h |
index 4016861820ae15b4ca009ca52a801256fe642471..f614f0263e5aebfe0a409d148bd40af9a7defacd 100644 |
--- a/content/child/child_thread_impl.h |
+++ b/content/child/child_thread_impl.h |
@@ -61,17 +61,7 @@ class CONTENT_EXPORT ChildThreadImpl |
: public IPC::Listener, |
virtual public ChildThread { |
public: |
- struct CONTENT_EXPORT Options { |
- Options(); |
- explicit Options(bool mojo); |
- Options(std::string name, bool mojo); |
- ~Options(); |
- |
- std::string channel_name; |
- bool use_mojo_channel; |
- bool in_browser_process; |
- std::vector<IPC::MessageFilter*> startup_filters; |
- }; |
+ struct CONTENT_EXPORT Options; |
// Creates the thread. |
ChildThreadImpl(); |
@@ -305,6 +295,37 @@ class CONTENT_EXPORT ChildThreadImpl |
DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); |
}; |
+struct ChildThreadImpl::Options { |
+ ~Options(); |
+ |
+ class Builder; |
+ |
+ std::string channel_name; |
+ bool use_mojo_channel; |
+ bool in_browser_process; |
+ std::vector<IPC::MessageFilter*> startup_filters; |
+ |
+ private: |
+ Options(); |
+}; |
+ |
+class ChildThreadImpl::Options::Builder { |
+ public: |
+ Builder(); |
+ |
+ Builder& InBrowserProcess(bool in_browser_process); |
+ Builder& UseMojoChannel(bool use_mojo_channel); |
+ Builder& WithChannelName(const std::string& channel_name); |
+ Builder& AddStartupFilter(IPC::MessageFilter* filter); |
+ |
+ Options Build(); |
+ |
+ private: |
+ struct Options options_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(Builder); |
+}; |
+ |
} // namespace content |
#endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |