Chromium Code Reviews| 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..529fb0823b3884958bab9d91e71f970985658fc9 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,35 @@ 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_; |
|
no sievers
2015/03/04 19:10:49
DISALLOW_COPY_AND_ASSIGN()? Unless it's a useful p
Sami
2015/03/04 19:21:16
Done.
|
| +}; |
| + |
| } // namespace content |
| #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |