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

Unified Diff: content/child/child_thread_impl.h

Issue 2137303002: Allow ChildThreadImpl subclasses to manually start MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
« no previous file with comments | « no previous file | content/child/child_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.h
diff --git a/content/child/child_thread_impl.h b/content/child/child_thread_impl.h
index e4447c9ed1adb41d14e98df097a22df12e15c115..a68a63924d3fdfd99d43f1cb64c0498bf9046169 100644
--- a/content/child/child_thread_impl.h
+++ b/content/child/child_thread_impl.h
@@ -203,9 +203,10 @@ class CONTENT_EXPORT ChildThreadImpl
// Called when the process refcount is 0.
void OnProcessFinalRelease();
- // Implemented by subclasses to attach ConnectionFilters to the thread's
- // shell connection.
- virtual void AddConnectionFilters(MojoShellConnection* connection);
+ // Called by subclasses to manually start the MojoShellConnection. Must only
+ // be called if ChildThreadImpl::Options::auto_start_mojo_shell_connection
+ // was set to |false| on ChildThreadImpl construction.
+ void StartMojoShellConnection();
virtual bool OnControlMessageReceived(const IPC::Message& msg);
virtual void OnProcessBackgrounded(bool backgrounded);
@@ -323,6 +324,7 @@ struct ChildThreadImpl::Options {
std::string channel_name;
bool use_mojo_channel;
+ bool auto_start_mojo_shell_connection;
scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner;
std::vector<IPC::MessageFilter*> startup_filters;
std::string in_process_ipc_token;
@@ -338,6 +340,7 @@ class ChildThreadImpl::Options::Builder {
Builder& InBrowserProcess(const InProcessChildThreadParams& params);
Builder& UseMojoChannel(bool use_mojo_channel);
+ Builder& AutoStartMojoShellConnection(bool auto_start);
Builder& WithChannelName(const std::string& channel_name);
Builder& AddStartupFilter(IPC::MessageFilter* filter);
« no previous file with comments | « no previous file | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698