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

Unified Diff: content/child/child_thread.h

Issue 847203004: Allow child thread to install filters prior to channel connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.h
diff --git a/content/child/child_thread.h b/content/child/child_thread.h
index 8dc2630e28b8c9cb2b6986c5293f5598bde2efc8..24cfc61f22cbbaf37a51e700b1764c09dee9240b 100644
--- a/content/child/child_thread.h
+++ b/content/child/child_thread.h
@@ -27,6 +27,7 @@ class TraceMemoryController;
} // namespace base
namespace IPC {
+class MessageFilter;
class SyncChannel;
class SyncMessageFilter;
} // namespace IPC
@@ -61,16 +62,19 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
struct CONTENT_EXPORT Options {
Options();
explicit Options(bool mojo);
- Options(std::string name, bool mojo)
- : channel_name(name), use_mojo_channel(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;
};
// Creates the thread.
ChildThread();
- // Used for single-process mode and for in process gpu mode.
+ // Allow to be used for single-process mode and for in process gpu mode via
+ // options.
explicit ChildThread(const Options& options);
// ChildProcess::main_thread() is reset after Shutdown(), and before the
// destructor, so any subsystem that relies on ChildProcess::main_thread()
@@ -207,7 +211,10 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
};
void Init(const Options& options);
- scoped_ptr<IPC::SyncChannel> CreateChannel(bool use_mojo_channel);
+
+ // We create the channel first without connecting it so we can add filters
+ // prior to any messages being received, then connect it afterwards.
+ void ConnectChannel(bool use_mojo_channel);
// IPC message handlers.
void OnShutdown();
« no previous file with comments | « no previous file | content/child/child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698