| Index: content/child/child_thread.h
|
| diff --git a/content/child/child_thread.h b/content/child/child_thread.h
|
| index 233e9c8cf1a0e32133e15bc24d695293e6492ebd..4b32114cb1893bb826f5018448bfeabb53257c5a 100644
|
| --- a/content/child/child_thread.h
|
| +++ b/content/child/child_thread.h
|
| @@ -15,6 +15,7 @@
|
| #include "base/tracked_objects.h"
|
| #include "content/common/content_export.h"
|
| #include "content/common/message_router.h"
|
| +#include "ipc/ipc_channel_proxy.h"
|
| #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
|
| #include "webkit/child/resource_loader_bridge.h"
|
|
|
| @@ -49,6 +50,28 @@ class SocketStreamDispatcher;
|
| class ThreadSafeSender;
|
| class WebSocketDispatcher;
|
|
|
| +class MessagePortBypassFilter : public IPC::ChannelProxy::MessageFilter {
|
| + public:
|
| + MessagePortBypassFilter(base::SingleThreadTaskRunner* ipc_task_runner);
|
| + virtual ~MessagePortBypassFilter();
|
| +
|
| + // IPC::ChannelProxy::MessageFilter implementation.
|
| + virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
| + virtual bool GetSupportedMessageClasses(
|
| + std::vector<uint32>* supported_message_classes) const OVERRIDE;
|
| +
|
| + void AddRoute(int32 routing_id, IPC::Listener* listener);
|
| + void RemoveRoute(int32 routing_id, const base::Closure& callback);
|
| +
|
| + private:
|
| + void AddRouteOnIO(int32 routing_id, IPC::Listener* listener);
|
| + void RemoveRouteOnIO(int32 routing_id, const base::Closure& callback);
|
| +
|
| + IDMap<IPC::Listener> routes_;
|
| + scoped_refptr<base::SingleThreadTaskRunner> ipc_task_runner_;
|
| + scoped_refptr<base::MessageLoopProxy> child_thread_loop_;
|
| +};
|
| +
|
| // The main thread of a child process derives from this class.
|
| class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
|
| public:
|
| @@ -119,6 +142,10 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
|
| return sync_message_filter_.get();
|
| }
|
|
|
| + MessagePortBypassFilter* message_port_bypass_filter() const {
|
| + return message_port_bypass_filter_.get();
|
| + }
|
| +
|
| // The getter should only be called on the main thread, however the
|
| // IPC::Sender it returns may be safely called on any thread including
|
| // the main thread.
|
| @@ -232,6 +259,8 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
|
|
|
| scoped_refptr<QuotaMessageFilter> quota_message_filter_;
|
|
|
| + scoped_refptr<MessagePortBypassFilter> message_port_bypass_filter_;
|
| +
|
| scoped_ptr<ChildSharedBitmapManager> shared_bitmap_manager_;
|
|
|
| base::WeakPtrFactory<ChildThread> channel_connected_factory_;
|
|
|