Index: chrome/common/child_thread.h |
=================================================================== |
--- chrome/common/child_thread.h (revision 43588) |
+++ chrome/common/child_thread.h (working copy) |
@@ -15,6 +15,10 @@ |
class NotificationService; |
class SocketStreamDispatcher; |
+namespace IPC { |
+class SyncMessageFilter; |
+} |
+ |
// The main thread of a child process derives from this class. |
class ChildThread : public IPC::Channel::Listener, |
public IPC::Message::Sender { |
@@ -49,6 +53,10 @@ |
return socket_stream_dispatcher_.get(); |
} |
+ // Safe to call on any thread, as long as it's guaranteed that the thread's |
+ // lifetime is less than the main thread. |
+ IPC::SyncMessageFilter* sync_message_filter() { return sync_message_filter_; } |
+ |
MessageLoop* message_loop() { return message_loop_; } |
// Returns the one child thread. |
@@ -84,6 +92,9 @@ |
std::string channel_name_; |
scoped_ptr<IPC::SyncChannel> channel_; |
+ // Allows threads other than the main thread to send sync messages. |
+ scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; |
+ |
// Implements message routing functionality to the consumers of ChildThread. |
MessageRouter router_; |