summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/api/webstore/webstore_api.h2
-rw-r--r--chrome/renderer/media/cast_ipc_dispatcher.h5
-rw-r--r--chrome/renderer/media/mock_webrtc_logging_message_filter.cc1
-rw-r--r--chrome/renderer/media/webrtc_logging_message_filter.h7
-rw-r--r--components/nacl/renderer/pnacl_translation_resource_host.h6
-rw-r--r--components/tracing/child_trace_message_filter.cc1
-rw-r--r--components/tracing/child_trace_message_filter.h6
-rw-r--r--content/browser/gpu/browser_gpu_channel_host_factory.cc3
-rw-r--r--content/browser/gpu/browser_gpu_channel_host_factory.h6
-rw-r--r--content/browser/gpu/gpu_process_host.cc3
-rw-r--r--content/browser/gpu/gpu_process_host.h4
-rw-r--r--content/browser/renderer_host/pepper/browser_ppapi_host_impl.h8
-rw-r--r--content/browser/renderer_host/render_message_filter.h3
-rw-r--r--content/browser/service_worker/service_worker_provider_host.h2
-rw-r--r--content/child/child_histogram_message_filter.cc1
-rw-r--r--content/child/child_histogram_message_filter.h7
-rw-r--r--content/child/child_message_filter.cc5
-rw-r--r--content/child/child_message_filter.h13
-rw-r--r--content/child/child_resource_message_filter.h6
-rw-r--r--content/child/child_thread.cc4
-rw-r--r--content/child/db_message_filter.h7
-rw-r--r--content/child/indexed_db/indexed_db_message_filter.h7
-rw-r--r--content/child/power_monitor_broadcast_source.cc6
-rw-r--r--content/child/power_monitor_broadcast_source.h7
-rw-r--r--content/child/power_monitor_broadcast_source_unittest.cc4
-rw-r--r--content/child/quota_message_filter.h1
-rw-r--r--content/common/child_process_host_impl.cc3
-rw-r--r--content/common/child_process_host_impl.h8
-rw-r--r--content/common/font_cache_dispatcher_win.cc1
-rw-r--r--content/common/font_cache_dispatcher_win.h12
-rw-r--r--content/common/gpu/client/gpu_channel_host.h6
-rw-r--r--content/common/gpu/gpu_channel.cc8
-rw-r--r--content/common/gpu/gpu_channel.h8
-rw-r--r--content/common/gpu/media/gpu_video_decode_accelerator.cc4
-rw-r--r--content/plugin/plugin_channel.cc5
-rw-r--r--content/plugin/plugin_thread.cc5
-rw-r--r--content/public/browser/browser_message_filter.cc7
-rw-r--r--content/public/browser/browser_message_filter.h18
-rw-r--r--content/public/common/child_process_host.h6
-rw-r--r--content/public/renderer/render_thread.h5
-rw-r--r--content/public/test/mock_render_thread.cc7
-rw-r--r--content/public/test/mock_render_thread.h8
-rw-r--r--content/renderer/devtools/devtools_agent_filter.h7
-rw-r--r--content/renderer/dom_storage/dom_storage_dispatcher.cc3
-rw-r--r--content/renderer/input/input_event_filter.cc2
-rw-r--r--content/renderer/input/input_event_filter.h19
-rw-r--r--content/renderer/input/input_event_filter_unittest.cc6
-rw-r--r--content/renderer/media/android/renderer_demuxer_android.cc1
-rw-r--r--content/renderer/media/android/renderer_demuxer_android.h10
-rw-r--r--content/renderer/media/audio_input_message_filter.cc1
-rw-r--r--content/renderer/media/audio_input_message_filter.h7
-rw-r--r--content/renderer/media/audio_message_filter.h7
-rw-r--r--content/renderer/media/midi_message_filter.h7
-rw-r--r--content/renderer/media/video_capture_message_filter.cc1
-rw-r--r--content/renderer/media/video_capture_message_filter.h7
-rw-r--r--content/renderer/p2p/socket_dispatcher.cc1
-rw-r--r--content/renderer/p2p/socket_dispatcher.h7
-rw-r--r--content/renderer/render_thread_impl.cc4
-rw-r--r--content/renderer/render_thread_impl.h6
-rw-r--r--content/renderer/service_worker/embedded_worker_context_message_filter.h4
-rw-r--r--content/renderer/shared_worker/embedded_shared_worker_stub.h2
-rw-r--r--ipc/BUILD.gn4
-rw-r--r--ipc/ipc.gypi4
-rw-r--r--ipc/ipc_channel_proxy.cc123
-rw-r--r--ipc/ipc_channel_proxy.h53
-rw-r--r--ipc/ipc_channel_proxy_unittest.cc3
-rw-r--r--ipc/ipc_forwarding_message_filter.cc1
-rw-r--r--ipc/ipc_forwarding_message_filter.h7
-rw-r--r--ipc/ipc_sync_message_filter.cc1
-rw-r--r--ipc/ipc_sync_message_filter.h8
-rw-r--r--ipc/message_filter.cc35
-rw-r--r--ipc/message_filter.h67
-rw-r--r--ipc/message_filter_router.cc92
-rw-r--r--ipc/message_filter_router.h42
-rw-r--r--ppapi/proxy/dispatcher.cc7
-rw-r--r--ppapi/proxy/dispatcher.h7
-rw-r--r--ppapi/proxy/host_dispatcher.h4
-rw-r--r--ppapi/proxy/plugin_message_filter.cc1
-rw-r--r--ppapi/proxy/plugin_message_filter.h7
-rw-r--r--win8/viewer/metro_viewer_process_host.cc1
-rw-r--r--win8/viewer/metro_viewer_process_host.h6
81 files changed, 489 insertions, 322 deletions
diff --git a/chrome/browser/extensions/api/webstore/webstore_api.h b/chrome/browser/extensions/api/webstore/webstore_api.h
index e345491..0410445 100644
--- a/chrome/browser/extensions/api/webstore/webstore_api.h
+++ b/chrome/browser/extensions/api/webstore/webstore_api.h
@@ -23,7 +23,7 @@ namespace content {
class BrowserContext;
}
-namespace ipc {
+namespace IPC {
class Sender;
}
diff --git a/chrome/renderer/media/cast_ipc_dispatcher.h b/chrome/renderer/media/cast_ipc_dispatcher.h
index 4e87f2e..320b797 100644
--- a/chrome/renderer/media/cast_ipc_dispatcher.h
+++ b/chrome/renderer/media/cast_ipc_dispatcher.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/id_map.h"
#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "media/cast/cast_sender.h"
#include "media/cast/logging/logging_defines.h"
#include "media/cast/transport/cast_transport_sender.h"
@@ -16,7 +17,7 @@ class CastTransportSenderIPC;
// This dispatcher listens to incoming IPC messages and sends
// the call to the correct CastTransportSenderIPC instance.
-class CastIPCDispatcher : public IPC::ChannelProxy::MessageFilter {
+class CastIPCDispatcher : public IPC::MessageFilter {
public:
explicit CastIPCDispatcher(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
@@ -26,7 +27,7 @@ class CastIPCDispatcher : public IPC::ChannelProxy::MessageFilter {
int32 AddSender(CastTransportSenderIPC* sender);
void RemoveSender(int32 channel_id);
- // IPC::ChannelProxy::MessageFilter implementation
+ // IPC::MessageFilter implementation
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
diff --git a/chrome/renderer/media/mock_webrtc_logging_message_filter.cc b/chrome/renderer/media/mock_webrtc_logging_message_filter.cc
index 2721b70..ee0d12c 100644
--- a/chrome/renderer/media/mock_webrtc_logging_message_filter.cc
+++ b/chrome/renderer/media/mock_webrtc_logging_message_filter.cc
@@ -5,6 +5,7 @@
#include "chrome/renderer/media/mock_webrtc_logging_message_filter.h"
#include "base/logging.h"
+#include "base/message_loop/message_loop_proxy.h"
MockWebRtcLoggingMessageFilter::MockWebRtcLoggingMessageFilter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
diff --git a/chrome/renderer/media/webrtc_logging_message_filter.h b/chrome/renderer/media/webrtc_logging_message_filter.h
index ec91dcc..7d869f5 100644
--- a/chrome/renderer/media/webrtc_logging_message_filter.h
+++ b/chrome/renderer/media/webrtc_logging_message_filter.h
@@ -6,7 +6,7 @@
#define CHROME_RENDERER_MEDIA_WEBRTC_LOGGING_MESSAGE_FILTER_H_
#include "chrome/common/media/webrtc_logging_message_data.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
namespace base {
class MessageLoopProxy;
@@ -17,8 +17,7 @@ class ChromeWebRtcLogMessageDelegate;
// Filter for WebRTC logging messages. Sits between
// ChromeWebRtcLogMessageDelegate (renderer process) and
// WebRtcLoggingHandlerHost (browser process). Must be called on the IO thread.
-class WebRtcLoggingMessageFilter
- : public IPC::ChannelProxy::MessageFilter {
+class WebRtcLoggingMessageFilter : public IPC::MessageFilter {
public:
explicit WebRtcLoggingMessageFilter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
@@ -47,7 +46,7 @@ class WebRtcLoggingMessageFilter
ChromeWebRtcLogMessageDelegate* log_message_delegate_;
private:
- // IPC::ChannelProxy::MessageFilter implementation.
+ // IPC::MessageFilter implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
diff --git a/components/nacl/renderer/pnacl_translation_resource_host.h b/components/nacl/renderer/pnacl_translation_resource_host.h
index 6570cd0..7b41362 100644
--- a/components/nacl/renderer/pnacl_translation_resource_host.h
+++ b/components/nacl/renderer/pnacl_translation_resource_host.h
@@ -7,8 +7,8 @@
#include <map>
-#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_platform_file.h"
+#include "ipc/message_filter.h"
#include "ppapi/c/private/pp_file_handle.h"
#include "ppapi/shared_impl/tracked_callback.h"
@@ -22,7 +22,7 @@ struct PnaclCacheInfo;
// "Resource" might not be the best name for the various things that pnacl
// needs from the browser since "Resource" is a Pepper thing...
-class PnaclTranslationResourceHost : public IPC::ChannelProxy::MessageFilter {
+class PnaclTranslationResourceHost : public IPC::MessageFilter {
public:
explicit PnaclTranslationResourceHost(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
@@ -54,7 +54,7 @@ class PnaclTranslationResourceHost : public IPC::ChannelProxy::MessageFilter {
// Maps the instance with an outstanding cache request to the info
// about that request.
typedef std::map<PP_Instance, CacheRequestInfo> CacheRequestInfoMap;
- // IPC::ChannelProxy::MessageFilter implementation.
+ // IPC::MessageFilter implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 847ff9a..46cdf33 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -7,6 +7,7 @@
#include "base/debug/trace_event.h"
#include "base/message_loop/message_loop_proxy.h"
#include "components/tracing/tracing_messages.h"
+#include "ipc/ipc_channel.h"
using base::debug::TraceLog;
diff --git a/components/tracing/child_trace_message_filter.h b/components/tracing/child_trace_message_filter.h
index d2aae3b..cc52418 100644
--- a/components/tracing/child_trace_message_filter.h
+++ b/components/tracing/child_trace_message_filter.h
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/memory/ref_counted_memory.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
namespace base {
class MessageLoopProxy;
@@ -16,11 +16,11 @@ class MessageLoopProxy;
namespace tracing {
// This class sends and receives trace messages on child processes.
-class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter {
+class ChildTraceMessageFilter : public IPC::MessageFilter {
public:
explicit ChildTraceMessageFilter(base::MessageLoopProxy* ipc_message_loop);
- // IPC::ChannelProxy::MessageFilter implementation.
+ // IPC::MessageFilter implementation.
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
index 55d59df..a006f1e 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -17,6 +17,7 @@
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/common/content_client.h"
#include "ipc/ipc_forwarding_message_filter.h"
+#include "ipc/message_filter.h"
namespace content {
@@ -399,7 +400,7 @@ scoped_ptr<gfx::GpuMemoryBuffer>
// static
void BrowserGpuChannelHostFactory::AddFilterOnIO(
int host_id,
- scoped_refptr<IPC::ChannelProxy::MessageFilter> filter) {
+ scoped_refptr<IPC::MessageFilter> filter) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
GpuProcessHost* host = GpuProcessHost::FromID(host_id);
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.h b/content/browser/gpu/browser_gpu_channel_host_factory.h
index a9a1539..0dc71a8 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.h
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.h
@@ -13,6 +13,7 @@
#include "base/synchronization/waitable_event.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "ipc/ipc_channel_handle.h"
+#include "ipc/message_filter.h"
namespace content {
@@ -122,9 +123,8 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
static void OnImageCreated(
const CreateImageCallback& callback, const gfx::Size size);
void DeleteImageOnIO(int32 image_id, int32 sync_point);
- static void AddFilterOnIO(
- int gpu_host_id,
- scoped_refptr<IPC::ChannelProxy::MessageFilter> filter);
+ static void AddFilterOnIO(int gpu_host_id,
+ scoped_refptr<IPC::MessageFilter> filter);
const int gpu_client_id_;
scoped_ptr<base::WaitableEvent> shutdown_event_;
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 423107d..3af8424 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -37,6 +37,7 @@
#include "gpu/command_buffer/service/gpu_switches.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_switches.h"
+#include "ipc/message_filter.h"
#include "ui/events/latency_info.h"
#include "ui/gl/gl_switches.h"
@@ -547,7 +548,7 @@ bool GpuProcessHost::Send(IPC::Message* msg) {
return result;
}
-void GpuProcessHost::AddFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void GpuProcessHost::AddFilter(IPC::MessageFilter* filter) {
DCHECK(CalledOnValidThread());
process_->GetHost()->AddFilter(filter);
}
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 37dd64c..17adefc 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -23,8 +23,8 @@
#include "content/public/browser/gpu_data_manager.h"
#include "gpu/command_buffer/common/constants.h"
#include "gpu/config/gpu_info.h"
-#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_sender.h"
+#include "ipc/message_filter.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
#include "url/gurl.h"
@@ -96,7 +96,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
virtual bool Send(IPC::Message* msg) OVERRIDE;
// Adds a message filter to the GpuProcessHost's channel.
- void AddFilter(IPC::ChannelProxy::MessageFilter* filter);
+ void AddFilter(IPC::MessageFilter* filter);
// Tells the GPU process to create a new channel for communication with a
// client. Once the GPU process responds asynchronously with the IPC handle
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
index 0732214..16fec3d 100644
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
@@ -19,7 +19,7 @@
#include "content/common/pepper_renderer_instance_data.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/common/process_type.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "ppapi/host/ppapi_host.h"
namespace content {
@@ -69,7 +69,7 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
const PepperRendererInstanceData& instance_data);
void DeleteInstance(PP_Instance instance);
- scoped_refptr<IPC::ChannelProxy::MessageFilter> message_filter() {
+ scoped_refptr<IPC::MessageFilter> message_filter() {
return message_filter_;
}
@@ -83,12 +83,12 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
// Implementing MessageFilter on BrowserPpapiHostImpl makes it ref-counted,
// preventing us from returning these to embedders without holding a
// reference. To avoid that, define a message filter object.
- class HostMessageFilter : public IPC::ChannelProxy::MessageFilter {
+ class HostMessageFilter : public IPC::MessageFilter {
public:
HostMessageFilter(ppapi::host::PpapiHost* ppapi_host,
BrowserPpapiHostImpl* browser_ppapi_host_impl);
- // IPC::ChannelProxy::MessageFilter.
+ // IPC::MessageFilter.
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
void OnHostDestroyed();
diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h
index a82ed94..3c42f53 100644
--- a/content/browser/renderer_host/render_message_filter.h
+++ b/content/browser/renderer_host/render_message_filter.h
@@ -23,6 +23,7 @@
#include "content/common/pepper_renderer_instance_data.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/common/three_d_api_types.h"
+#include "ipc/message_filter.h"
#include "media/audio/audio_parameters.h"
#include "media/base/channel_layout.h"
#include "net/cookies/canonical_cookie.h"
@@ -95,7 +96,7 @@ class RenderMessageFilter : public BrowserMessageFilter {
MediaInternals* media_internals,
DOMStorageContextWrapper* dom_storage_context);
- // IPC::ChannelProxy::MessageFilter methods:
+ // IPC::MessageFilter methods:
virtual void OnChannelClosing() OVERRIDE;
virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index 1ca21b06..db8d3ca 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -12,7 +12,7 @@
#include "content/common/content_export.h"
#include "webkit/common/resource_type.h"
-namespace ipc {
+namespace IPC {
class Sender;
}
diff --git a/content/child/child_histogram_message_filter.cc b/content/child/child_histogram_message_filter.cc
index f05d111c..cab7bea 100644
--- a/content/child/child_histogram_message_filter.cc
+++ b/content/child/child_histogram_message_filter.cc
@@ -12,6 +12,7 @@
#include "content/child/child_process.h"
#include "content/child/child_thread.h"
#include "content/common/child_process_messages.h"
+#include "ipc/ipc_channel.h"
namespace content {
diff --git a/content/child/child_histogram_message_filter.h b/content/child/child_histogram_message_filter.h
index 98a30a2..14aa740 100644
--- a/content/child/child_histogram_message_filter.h
+++ b/content/child/child_histogram_message_filter.h
@@ -9,7 +9,8 @@
#include <vector>
#include "base/basictypes.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "base/memory/scoped_ptr.h"
+#include "ipc/message_filter.h"
namespace base {
class HistogramDeltaSerialization;
@@ -18,11 +19,11 @@ class MessageLoopProxy;
namespace content {
-class ChildHistogramMessageFilter : public IPC::ChannelProxy::MessageFilter {
+class ChildHistogramMessageFilter : public IPC::MessageFilter {
public:
ChildHistogramMessageFilter();
- // IPC::ChannelProxy::MessageFilter implementation.
+ // IPC::MessageFilter implementation.
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
diff --git a/content/child/child_message_filter.cc b/content/child/child_message_filter.cc
index c325632..5d2f2e4 100644
--- a/content/child/child_message_filter.cc
+++ b/content/child/child_message_filter.cc
@@ -10,10 +10,11 @@
#include "base/task_runner.h"
#include "content/child/child_thread.h"
#include "content/child/thread_safe_sender.h"
+#include "ipc/message_filter.h"
namespace content {
-class ChildMessageFilter::Internal : public IPC::ChannelProxy::MessageFilter {
+class ChildMessageFilter::Internal : public IPC::MessageFilter {
public:
explicit Internal(ChildMessageFilter* filter) : filter_(filter) {}
@@ -55,7 +56,7 @@ ChildMessageFilter::ChildMessageFilter()
ChildMessageFilter::~ChildMessageFilter() {}
-IPC::ChannelProxy::MessageFilter* ChildMessageFilter::GetFilter() {
+IPC::MessageFilter* ChildMessageFilter::GetFilter() {
if (!internal_)
internal_ = new Internal(this);
return internal_;
diff --git a/content/child/child_message_filter.h b/content/child/child_message_filter.h
index 21cccac..0d9c4ff 100644
--- a/content/child/child_message_filter.h
+++ b/content/child/child_message_filter.h
@@ -5,12 +5,17 @@
#ifndef CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_
#define CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_
-#include "ipc/ipc_channel_proxy.h"
+#include "base/memory/ref_counted.h"
+#include "ipc/ipc_sender.h"
namespace base {
class TaskRunner;
}
+namespace IPC {
+class MessageFilter;
+}
+
namespace content {
class ThreadSafeSender;
@@ -52,10 +57,10 @@ class ChildMessageFilter
friend class base::RefCountedThreadSafe<ChildMessageFilter>;
- IPC::ChannelProxy::MessageFilter* GetFilter();
+ IPC::MessageFilter* GetFilter();
- // This implements IPC::ChannelProxy::MessageFilter to hide the actual
- // filter methods from child classes.
+ // This implements IPC::MessageFilter to hide the actual filter methods from
+ // child classes.
Internal* internal_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
diff --git a/content/child/child_resource_message_filter.h b/content/child/child_resource_message_filter.h
index 2f3d30f..66e7bf6 100644
--- a/content/child/child_resource_message_filter.h
+++ b/content/child/child_resource_message_filter.h
@@ -6,7 +6,7 @@
#define CONTENT_CHILD_CHILD_RESOURCE_MESSAGE_FILTER_H_
#include "base/memory/ref_counted.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
namespace base {
class SingleThreadTaskRunner;
@@ -27,11 +27,11 @@ class ResourceDispatcher;
// When specific message is processed by this filter, new task charged
// with timestamp is posted to main thread. This task is processed just before
// resource message and invokes ResourceDispatcher::set_io_timestamp.
-class ChildResourceMessageFilter : public IPC::ChannelProxy::MessageFilter {
+class ChildResourceMessageFilter : public IPC::MessageFilter {
public:
explicit ChildResourceMessageFilter(ResourceDispatcher* resource_dispatcher);
- // IPC::ChannelProxy::MessageFilter implementation.
+ // IPC::MessageFilter implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 4bced8c..2c9c59e 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -110,9 +110,9 @@ bool CreateWaitAndExitThread(base::TimeDelta duration) {
}
#endif
-class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter {
+class SuicideOnChannelErrorFilter : public IPC::MessageFilter {
public:
- // IPC::ChannelProxy::MessageFilter
+ // IPC::MessageFilter
virtual void OnChannelError() OVERRIDE {
// For renderer/worker processes:
// On POSIX, at least, one can install an unload handler which loops
diff --git a/content/child/db_message_filter.h b/content/child/db_message_filter.h
index 4950006..7297a04 100644
--- a/content/child/db_message_filter.h
+++ b/content/child/db_message_filter.h
@@ -5,17 +5,18 @@
#ifndef CONTENT_CHILD_DB_MESSAGE_FILTER_H_
#define CONTENT_CHILD_DB_MESSAGE_FILTER_H_
-#include "ipc/ipc_channel_proxy.h"
+#include "base/strings/string16.h"
+#include "ipc/message_filter.h"
namespace content {
// Receives database messages from the browser process and processes them on the
// IO thread.
-class DBMessageFilter : public IPC::ChannelProxy::MessageFilter {
+class DBMessageFilter : public IPC::MessageFilter {
public:
DBMessageFilter();
- // IPC::ChannelProxy::MessageFilter
+ // IPC::MessageFilter
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
protected:
diff --git a/content/child/indexed_db/indexed_db_message_filter.h b/content/child/indexed_db/indexed_db_message_filter.h
index 1174487..8b17954 100644
--- a/content/child/indexed_db/indexed_db_message_filter.h
+++ b/content/child/indexed_db/indexed_db_message_filter.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_CHILD_INDEXED_DB_INDEXED_DB_MESSAGE_FILTER_H_
#define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_MESSAGE_FILTER_H_
+#include "base/memory/ref_counted.h"
#include "content/child/child_message_filter.h"
struct IndexedDBDatabaseMetadata;
@@ -12,7 +13,11 @@ struct IndexedDBMsg_CallbacksUpgradeNeeded_Params;
namespace base {
class MessageLoopProxy;
-} // namespace base
+}
+
+namespace IPC {
+class Message;
+}
namespace content {
diff --git a/content/child/power_monitor_broadcast_source.cc b/content/child/power_monitor_broadcast_source.cc
index b3f72ed..0cbd75a 100644
--- a/content/child/power_monitor_broadcast_source.cc
+++ b/content/child/power_monitor_broadcast_source.cc
@@ -6,10 +6,11 @@
#include "base/message_loop/message_loop.h"
#include "content/common/power_monitor_messages.h"
+#include "ipc/message_filter.h"
namespace content {
-class PowerMessageFilter : public IPC::ChannelProxy::MessageFilter {
+class PowerMessageFilter : public IPC::MessageFilter {
public:
PowerMessageFilter(
PowerMonitorBroadcastSource* source,
@@ -83,8 +84,7 @@ PowerMonitorBroadcastSource::~PowerMonitorBroadcastSource() {
message_filter_->RemoveSource();
}
-IPC::ChannelProxy::MessageFilter*
-PowerMonitorBroadcastSource::GetMessageFilter() {
+IPC::MessageFilter* PowerMonitorBroadcastSource::GetMessageFilter() {
return message_filter_.get();
}
diff --git a/content/child/power_monitor_broadcast_source.h b/content/child/power_monitor_broadcast_source.h
index c2553f8..7bed46b 100644
--- a/content/child/power_monitor_broadcast_source.h
+++ b/content/child/power_monitor_broadcast_source.h
@@ -8,7 +8,10 @@
#include "base/power_monitor/power_monitor_source.h"
#include "content/common/content_export.h"
#include "ipc/ipc_channel.h"
-#include "ipc/ipc_channel_proxy.h"
+
+namespace IPC {
+class MessageFilter;
+}
namespace content {
@@ -22,7 +25,7 @@ class CONTENT_EXPORT PowerMonitorBroadcastSource :
explicit PowerMonitorBroadcastSource();
virtual ~PowerMonitorBroadcastSource();
- IPC::ChannelProxy::MessageFilter* GetMessageFilter();
+ IPC::MessageFilter* GetMessageFilter();
private:
friend class PowerMessageFilter;
diff --git a/content/child/power_monitor_broadcast_source_unittest.cc b/content/child/power_monitor_broadcast_source_unittest.cc
index b665e90..4e46943 100644
--- a/content/child/power_monitor_broadcast_source_unittest.cc
+++ b/content/child/power_monitor_broadcast_source_unittest.cc
@@ -6,6 +6,7 @@
#include "base/test/power_monitor_test_base.h"
#include "content/child/power_monitor_broadcast_source.h"
#include "content/common/power_monitor_messages.h"
+#include "ipc/message_filter.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
@@ -32,8 +33,7 @@ class PowerMonitorBroadcastSourceTest : public testing::Test {
};
TEST_F(PowerMonitorBroadcastSourceTest, PowerMessageReceiveBroadcast) {
- IPC::ChannelProxy::MessageFilter* message_filter =
- source()->GetMessageFilter();
+ IPC::MessageFilter* message_filter = source()->GetMessageFilter();
base::PowerMonitorTestObserver observer;
monitor()->AddObserver(&observer);
diff --git a/content/child/quota_message_filter.h b/content/child/quota_message_filter.h
index eabff1b..7ae0c0c 100644
--- a/content/child/quota_message_filter.h
+++ b/content/child/quota_message_filter.h
@@ -7,6 +7,7 @@
#include <map>
+#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "content/child/child_message_filter.h"
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index efdd925..6d6060e 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -23,6 +23,7 @@
#include "content/public/common/content_switches.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_logging.h"
+#include "ipc/message_filter.h"
#if defined(OS_LINUX)
#include "base/linux_util.h"
@@ -150,7 +151,7 @@ ChildProcessHostImpl::~ChildProcessHostImpl() {
base::CloseProcessHandle(peer_handle_);
}
-void ChildProcessHostImpl::AddFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void ChildProcessHostImpl::AddFilter(IPC::MessageFilter* filter) {
filters_.push_back(filter);
if (channel_)
diff --git a/content/common/child_process_host_impl.h b/content/common/child_process_host_impl.h
index 57a410b..1daa5d5 100644
--- a/content/common/child_process_host_impl.h
+++ b/content/common/child_process_host_impl.h
@@ -26,6 +26,10 @@ namespace gfx {
struct GpuMemoryBufferHandle;
}
+namespace IPC {
+class MessageFilter;
+}
+
namespace content {
class ChildProcessHostDelegate;
@@ -58,7 +62,7 @@ class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost,
virtual void ForceShutdown() OVERRIDE;
virtual std::string CreateChannel() OVERRIDE;
virtual bool IsChannelOpening() OVERRIDE;
- virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE;
+ virtual void AddFilter(IPC::MessageFilter* filter) OVERRIDE;
#if defined(OS_POSIX)
virtual int TakeClientFileDescriptor() OVERRIDE;
#endif
@@ -91,7 +95,7 @@ class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost,
// Holds all the IPC message filters. Since this object lives on the IO
// thread, we don't have a IPC::ChannelProxy and so we manage filters
// manually.
- std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_;
+ std::vector<scoped_refptr<IPC::MessageFilter> > filters_;
DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl);
};
diff --git a/content/common/font_cache_dispatcher_win.cc b/content/common/font_cache_dispatcher_win.cc
index 47c9c12..3043079 100644
--- a/content/common/font_cache_dispatcher_win.cc
+++ b/content/common/font_cache_dispatcher_win.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/strings/string16.h"
#include "content/common/child_process_messages.h"
+#include "ipc/ipc_channel.h"
namespace content {
namespace {
diff --git a/content/common/font_cache_dispatcher_win.h b/content/common/font_cache_dispatcher_win.h
index 2ae8132..c1f4ebf 100644
--- a/content/common/font_cache_dispatcher_win.h
+++ b/content/common/font_cache_dispatcher_win.h
@@ -9,15 +9,19 @@
#include "base/basictypes.h"
#include "base/memory/singleton.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/ipc_sender.h"
+#include "ipc/message_filter.h"
+
+namespace IPC {
+class Channel;
+}
namespace content {
// Dispatches messages used for font caching on Windows. This is needed because
// Windows can't load fonts into its kernel cache in sandboxed processes. So the
// sandboxed process asks the browser process to do this for it.
-class FontCacheDispatcher : public IPC::ChannelProxy::MessageFilter,
- public IPC::Sender {
+class FontCacheDispatcher : public IPC::MessageFilter, public IPC::Sender {
public:
FontCacheDispatcher();
virtual ~FontCacheDispatcher();
@@ -26,7 +30,7 @@ class FontCacheDispatcher : public IPC::ChannelProxy::MessageFilter,
virtual bool Send(IPC::Message* message) OVERRIDE;
private:
- // IPC::ChannelProxy::MessageFilter implementation:
+ // IPC::MessageFilter implementation:
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
diff --git a/content/common/gpu/client/gpu_channel_host.h b/content/common/gpu/client/gpu_channel_host.h
index 24a52ff..7b95879 100644
--- a/content/common/gpu/client/gpu_channel_host.h
+++ b/content/common/gpu/client/gpu_channel_host.h
@@ -20,8 +20,8 @@
#include "content/common/message_router.h"
#include "gpu/config/gpu_info.h"
#include "ipc/ipc_channel_handle.h"
-#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_sync_channel.h"
+#include "ipc/message_filter.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
@@ -177,7 +177,7 @@ class GpuChannelHost : public IPC::Sender,
// A filter used internally to route incoming messages from the IO thread
// to the correct message loop. It also maintains some shared state between
// all the contexts.
- class MessageFilter : public IPC::ChannelProxy::MessageFilter {
+ class MessageFilter : public IPC::MessageFilter {
public:
MessageFilter();
@@ -188,7 +188,7 @@ class GpuChannelHost : public IPC::Sender,
// Called on the IO thread.
void RemoveRoute(int route_id);
- // IPC::ChannelProxy::MessageFilter implementation
+ // IPC::MessageFilter implementation
// (called on the IO thread):
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
virtual void OnChannelError() OVERRIDE;
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index bbcf01e..75a18e9 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -27,7 +27,7 @@
#include "gpu/command_buffer/service/image_manager.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "ipc/ipc_channel.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_image.h"
#include "ui/gl/gl_surface.h"
@@ -69,7 +69,7 @@ const int64 kStopPreemptThresholdMs = kVsyncIntervalMs;
// posting a task to insert the GpuCommandBufferMsg_RetireSyncPoint message
// into the channel's queue.
// - it generates mailbox names for clients of the GPU process on the IO thread.
-class GpuChannelMessageFilter : public IPC::ChannelProxy::MessageFilter {
+class GpuChannelMessageFilter : public IPC::MessageFilter {
public:
// Takes ownership of gpu_channel (see below).
GpuChannelMessageFilter(base::WeakPtr<GpuChannel>* gpu_channel,
@@ -845,11 +845,11 @@ void GpuChannel::CacheShader(const std::string& key,
new GpuHostMsg_CacheShader(client_id_, key, shader));
}
-void GpuChannel::AddFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void GpuChannel::AddFilter(IPC::MessageFilter* filter) {
channel_->AddFilter(filter);
}
-void GpuChannel::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void GpuChannel::RemoveFilter(IPC::MessageFilter* filter) {
channel_->RemoveFilter(filter);
}
diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h
index b51f845..3903135 100644
--- a/content/common/gpu/gpu_channel.h
+++ b/content/common/gpu/gpu_channel.h
@@ -38,6 +38,10 @@ class ImageManager;
}
}
+namespace IPC {
+class MessageFilter;
+}
+
namespace content {
class DevToolsGpuAgent;
class GpuChannelManager;
@@ -145,8 +149,8 @@ class GpuChannel : public IPC::Listener,
void CacheShader(const std::string& key, const std::string& shader);
- void AddFilter(IPC::ChannelProxy::MessageFilter* filter);
- void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter);
+ void AddFilter(IPC::MessageFilter* filter);
+ void RemoveFilter(IPC::MessageFilter* filter);
uint64 GetMemoryUsage();
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 1680c9c..69f8313 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -18,6 +18,7 @@
#include "gpu/command_buffer/common/command_buffer.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
+#include "ipc/message_filter.h"
#include "media/base/limits.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_surface_egl.h"
@@ -66,8 +67,7 @@ class DebugAutoLock {
};
#endif
-class GpuVideoDecodeAccelerator::MessageFilter
- : public IPC::ChannelProxy::MessageFilter {
+class GpuVideoDecodeAccelerator::MessageFilter : public IPC::MessageFilter {
public:
MessageFilter(GpuVideoDecodeAccelerator* owner, int32 host_route_id)
: owner_(owner), host_route_id_(host_route_id) {}
diff --git a/content/plugin/plugin_channel.cc b/content/plugin/plugin_channel.cc
index 1ba8878..9a566d5 100644
--- a/content/plugin/plugin_channel.cc
+++ b/content/plugin/plugin_channel.cc
@@ -20,6 +20,7 @@
#include "content/plugin/webplugin_delegate_stub.h"
#include "content/plugin/webplugin_proxy.h"
#include "content/public/common/content_switches.h"
+#include "ipc/message_filter.h"
#include "third_party/WebKit/public/web/WebBindings.h"
#if defined(OS_POSIX)
@@ -40,7 +41,7 @@ const int kPluginReleaseTimeMinutes = 5;
// If a sync call to the renderer results in a modal dialog, we need to have a
// way to know so that we can run a nested message loop to simulate what would
// happen in a single process browser and avoid deadlock.
-class PluginChannel::MessageFilter : public IPC::ChannelProxy::MessageFilter {
+class PluginChannel::MessageFilter : public IPC::MessageFilter {
public:
MessageFilter() : channel_(NULL) { }
@@ -77,7 +78,7 @@ class PluginChannel::MessageFilter : public IPC::ChannelProxy::MessageFilter {
return channel_->Send(message);
}
- // IPC::ChannelProxy::MessageFilter:
+ // IPC::MessageFilter:
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE {
channel_ = channel;
}
diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc
index 9c7519a..bec0f98 100644
--- a/content/plugin/plugin_thread.cc
+++ b/content/plugin/plugin_thread.cc
@@ -28,19 +28,20 @@
#include "content/public/plugin/content_plugin_client.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "ipc/ipc_channel_handle.h"
+#include "ipc/message_filter.h"
namespace content {
namespace {
-class EnsureTerminateMessageFilter : public IPC::ChannelProxy::MessageFilter {
+class EnsureTerminateMessageFilter : public IPC::MessageFilter {
public:
EnsureTerminateMessageFilter() {}
protected:
virtual ~EnsureTerminateMessageFilter() {}
- // IPC::ChannelProxy::MessageFilter:
+ // IPC::MessageFilter:
virtual void OnChannelError() OVERRIDE {
// How long we wait before forcibly shutting down the process.
const base::TimeDelta kPluginProcessTerminateTimeout =
diff --git a/content/public/browser/browser_message_filter.cc b/content/public/browser/browser_message_filter.cc
index 72b4a1c..452a495 100644
--- a/content/public/browser/browser_message_filter.cc
+++ b/content/public/browser/browser_message_filter.cc
@@ -15,19 +15,20 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
#include "ipc/ipc_sync_message.h"
+#include "ipc/message_filter.h"
using content::BrowserMessageFilter;
namespace content {
-class BrowserMessageFilter::Internal : public IPC::ChannelProxy::MessageFilter {
+class BrowserMessageFilter::Internal : public IPC::MessageFilter {
public:
explicit Internal(BrowserMessageFilter* filter) : filter_(filter) {}
private:
virtual ~Internal() {}
- // IPC::ChannelProxy::MessageFilter implementation:
+ // IPC::MessageFilter implementation:
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE {
filter_->channel_ = channel;
filter_->OnFilterAdded(channel);
@@ -219,7 +220,7 @@ BrowserMessageFilter::~BrowserMessageFilter() {
#endif
}
-IPC::ChannelProxy::MessageFilter* BrowserMessageFilter::GetFilter() {
+IPC::MessageFilter* BrowserMessageFilter::GetFilter() {
// We create this on demand so that if a filter is used in a unit test but
// never attached to a channel, we don't leak Internal and this;
DCHECK(!internal_) << "Should only be called once.";
diff --git a/content/public/browser/browser_message_filter.h b/content/public/browser/browser_message_filter.h
index 5505c1c..3330dfe 100644
--- a/content/public/browser/browser_message_filter.h
+++ b/content/public/browser/browser_message_filter.h
@@ -19,6 +19,10 @@ namespace base {
class TaskRunner;
}
+namespace IPC {
+class MessageFilter;
+}
+
namespace content {
struct BrowserMessageFilterTraits;
@@ -33,8 +37,8 @@ class CONTENT_EXPORT BrowserMessageFilter
BrowserMessageFilter(const uint32* message_classes_to_filter,
size_t num_message_classes_to_filter);
- // These match the corresponding IPC::ChannelProxy::MessageFilter methods and
- // are always called on the IO thread.
+ // These match the corresponding IPC::MessageFilter methods and are always
+ // called on the IO thread.
virtual void OnFilterAdded(IPC::Channel* channel) {}
virtual void OnFilterRemoved() {}
virtual void OnChannelClosing() {}
@@ -112,12 +116,12 @@ class CONTENT_EXPORT BrowserMessageFilter
// This is private because the only classes that need access to it are made
// friends above. This is only guaranteed to be valid on creation, after that
// this class could outlive the filter.
- IPC::ChannelProxy::MessageFilter* GetFilter();
+ IPC::MessageFilter* GetFilter();
- // This implements IPC::ChannelProxy::MessageFilter so that we can hide that
- // from child classes. Internal keeps a reference to this class, which is why
- // there's a weak pointer back. This class could outlive Internal based on
- // what the child class does in its OnDestruct method.
+ // This implements IPC::MessageFilter so that we can hide that from child
+ // classes. Internal keeps a reference to this class, which is why there's a
+ // weak pointer back. This class could outlive Internal based on what the
+ // child class does in its OnDestruct method.
Internal* internal_;
IPC::Channel* channel_;
diff --git a/content/public/common/child_process_host.h b/content/public/common/child_process_host.h
index 6ad0c29..c8abede 100644
--- a/content/public/common/child_process_host.h
+++ b/content/public/common/child_process_host.h
@@ -13,6 +13,10 @@ namespace base {
class FilePath;
}
+namespace IPC {
+class MessageFilter;
+}
+
namespace content {
class ChildProcessHostDelegate;
@@ -90,7 +94,7 @@ class CONTENT_EXPORT ChildProcessHost : public IPC::Sender {
virtual bool IsChannelOpening() = 0;
// Adds an IPC message filter. A reference will be kept to the filter.
- virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0;
+ virtual void AddFilter(IPC::MessageFilter* filter) = 0;
#if defined(OS_POSIX)
// See IPC::Channel::TakeClientFileDescriptor.
diff --git a/content/public/renderer/render_thread.h b/content/public/renderer/render_thread.h
index 40bcb77..a545150 100644
--- a/content/public/renderer/render_thread.h
+++ b/content/public/renderer/render_thread.h
@@ -26,6 +26,7 @@ class WaitableEvent;
}
namespace IPC {
+class MessageFilter;
class SyncChannel;
class SyncMessageFilter;
}
@@ -61,8 +62,8 @@ class CONTENT_EXPORT RenderThread : public IPC::Sender {
virtual int GenerateRoutingID() = 0;
// These map to IPC::ChannelProxy methods.
- virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0;
- virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) = 0;
+ virtual void AddFilter(IPC::MessageFilter* filter) = 0;
+ virtual void RemoveFilter(IPC::MessageFilter* filter) = 0;
// Add/remove observers for the process.
virtual void AddObserver(RenderProcessObserver* observer) = 0;
diff --git a/content/public/test/mock_render_thread.cc b/content/public/test/mock_render_thread.cc
index ba66d33..f14a557 100644
--- a/content/public/test/mock_render_thread.cc
+++ b/content/public/test/mock_render_thread.cc
@@ -11,6 +11,7 @@
#include "content/renderer/render_view_impl.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_sync_message.h"
+#include "ipc/message_filter.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebScriptController.h"
@@ -27,7 +28,7 @@ MockRenderThread::MockRenderThread()
MockRenderThread::~MockRenderThread() {
while (!filters_.empty()) {
- scoped_refptr<IPC::ChannelProxy::MessageFilter> filter = filters_.back();
+ scoped_refptr<IPC::MessageFilter> filter = filters_.back();
filters_.pop_back();
filter->OnFilterRemoved();
}
@@ -93,14 +94,14 @@ int MockRenderThread::GenerateRoutingID() {
return MSG_ROUTING_NONE;
}
-void MockRenderThread::AddFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void MockRenderThread::AddFilter(IPC::MessageFilter* filter) {
filter->OnFilterAdded(&sink());
// Add this filter to a vector so the MockRenderThread::RemoveFilter function
// can check if this filter is added.
filters_.push_back(make_scoped_refptr(filter));
}
-void MockRenderThread::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void MockRenderThread::RemoveFilter(IPC::MessageFilter* filter) {
// Emulate the IPC::ChannelProxy::OnRemoveFilter function.
for (size_t i = 0; i < filters_.size(); ++i) {
if (filters_[i].get() == filter) {
diff --git a/content/public/test/mock_render_thread.h b/content/public/test/mock_render_thread.h
index 3625158..b664697 100644
--- a/content/public/test/mock_render_thread.h
+++ b/content/public/test/mock_render_thread.h
@@ -10,11 +10,13 @@
#include "base/strings/string16.h"
#include "content/public/renderer/render_thread.h"
#include "ipc/ipc_test_sink.h"
+#include "ipc/message_filter.h"
#include "third_party/WebKit/public/web/WebPopupType.h"
struct ViewHostMsg_CreateWindow_Params;
namespace IPC {
+class MessageFilter;
class MessageReplyDeserializer;
}
@@ -44,8 +46,8 @@ class MockRenderThread : public RenderThread {
virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE;
virtual void RemoveRoute(int32 routing_id) OVERRIDE;
virtual int GenerateRoutingID() OVERRIDE;
- virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE;
- virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE;
+ virtual void AddFilter(IPC::MessageFilter* filter) OVERRIDE;
+ virtual void RemoveFilter(IPC::MessageFilter* filter) OVERRIDE;
virtual void AddObserver(RenderProcessObserver* observer) OVERRIDE;
virtual void RemoveObserver(RenderProcessObserver* observer) OVERRIDE;
virtual void SetResourceDispatcherDelegate(
@@ -156,7 +158,7 @@ class MockRenderThread : public RenderThread {
scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
// A list of message filters added to this thread.
- std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_;
+ std::vector<scoped_refptr<IPC::MessageFilter> > filters_;
// Observers to notify.
ObserverList<RenderProcessObserver> observers_;
diff --git a/content/renderer/devtools/devtools_agent_filter.h b/content/renderer/devtools/devtools_agent_filter.h
index 8935833..eb4fca9 100644
--- a/content/renderer/devtools/devtools_agent_filter.h
+++ b/content/renderer/devtools/devtools_agent_filter.h
@@ -8,12 +8,13 @@
#include <set>
#include <string>
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
struct DevToolsMessageData;
namespace base {
class MessageLoop;
+class MessageLoopProxy;
}
namespace content {
@@ -24,14 +25,14 @@ namespace content {
// are being dispatched there. While holding the thread in a tight loop,
// v8 provides thread-safe Api for controlling debugger. In our case v8's Api
// is being used from this communication agent on the IO thread.
-class DevToolsAgentFilter : public IPC::ChannelProxy::MessageFilter {
+class DevToolsAgentFilter : public IPC::MessageFilter {
public:
// There is a single instance of this class instantiated by the RenderThread.
DevToolsAgentFilter();
static void SendRpcMessage(const DevToolsMessageData& data);
- // IPC::ChannelProxy::MessageFilter override. Called on IO thread.
+ // IPC::MessageFilter override. Called on IO thread.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// Called on the main thread.
diff --git a/content/renderer/dom_storage/dom_storage_dispatcher.cc b/content/renderer/dom_storage/dom_storage_dispatcher.cc
index 477251c..6764a9b 100644
--- a/content/renderer/dom_storage/dom_storage_dispatcher.cc
+++ b/content/renderer/dom_storage/dom_storage_dispatcher.cc
@@ -16,6 +16,7 @@
#include "content/renderer/dom_storage/webstoragearea_impl.h"
#include "content/renderer/dom_storage/webstoragenamespace_impl.h"
#include "content/renderer/render_thread_impl.h"
+#include "ipc/message_filter.h"
#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebStorageEventDispatcher.h"
@@ -29,7 +30,7 @@ namespace {
// a synchronous message is sent to flush all pending messages thru.
// We expect to receive an 'ack' for each message sent. This object
// observes receipt of the acks on the IPC thread to decrement a counter.
-class MessageThrottlingFilter : public IPC::ChannelProxy::MessageFilter {
+class MessageThrottlingFilter : public IPC::MessageFilter {
public:
explicit MessageThrottlingFilter(RenderThreadImpl* sender)
: pending_count_(0), sender_(sender) {}
diff --git a/content/renderer/input/input_event_filter.cc b/content/renderer/input/input_event_filter.cc
index c208798..b59b8d4 100644
--- a/content/renderer/input/input_event_filter.cc
+++ b/content/renderer/input/input_event_filter.cc
@@ -15,6 +15,8 @@
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
#include "content/public/common/content_switches.h"
+#include "ipc/ipc_channel.h"
+#include "ipc/ipc_listener.h"
#include "ui/gfx/vector2d_f.h"
using blink::WebInputEvent;
diff --git a/content/renderer/input/input_event_filter.h b/content/renderer/input/input_event_filter.h
index 8a4b0f6..e79f5a7 100644
--- a/content/renderer/input/input_event_filter.h
+++ b/content/renderer/input/input_event_filter.h
@@ -13,9 +13,18 @@
#include "content/common/content_export.h"
#include "content/port/common/input_event_ack_state.h"
#include "content/renderer/input/input_handler_manager_client.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
+namespace base {
+class MessageLoopProxy;
+}
+
+namespace IPC {
+class Listener;
+class Sender;
+}
+
// This class can be used to intercept InputMsg_HandleInputEvent messages
// and have them be delivered to a target thread. Input events are filtered
// based on routing_id (see AddRoute and RemoveRoute).
@@ -26,9 +35,8 @@
namespace content {
-class CONTENT_EXPORT InputEventFilter
- : public InputHandlerManagerClient,
- public IPC::ChannelProxy::MessageFilter {
+class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
+ public IPC::MessageFilter {
public:
InputEventFilter(IPC::Listener* main_listener,
const scoped_refptr<base::MessageLoopProxy>& target_loop);
@@ -51,14 +59,13 @@ class CONTENT_EXPORT InputEventFilter
const DidOverscrollParams& params) OVERRIDE;
virtual void DidStopFlinging(int routing_id) OVERRIDE;
- // IPC::ChannelProxy::MessageFilter methods:
+ // IPC::MessageFilter methods:
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
- friend class IPC::ChannelProxy::MessageFilter;
virtual ~InputEventFilter();
void ForwardToMainListener(const IPC::Message& message);
diff --git a/content/renderer/input/input_event_filter_unittest.cc b/content/renderer/input/input_event_filter_unittest.cc
index e0762e1..5da8b79 100644
--- a/content/renderer/input/input_event_filter_unittest.cc
+++ b/content/renderer/input/input_event_filter_unittest.cc
@@ -12,7 +12,9 @@
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
#include "content/renderer/input/input_event_filter.h"
+#include "ipc/ipc_listener.h"
#include "ipc/ipc_test_sink.h"
+#include "ipc/message_filter.h"
#include "testing/gtest/include/gtest/gtest.h"
using blink::WebInputEvent;
@@ -97,7 +99,7 @@ class IPCMessageRecorder : public IPC::Listener {
std::vector<IPC::Message> messages_;
};
-void AddMessagesToFilter(IPC::ChannelProxy::MessageFilter* message_filter,
+void AddMessagesToFilter(IPC::MessageFilter* message_filter,
const std::vector<IPC::Message>& events) {
for (size_t i = 0; i < events.size(); ++i) {
message_filter->OnMessageReceived(events[i]);
@@ -106,7 +108,7 @@ void AddMessagesToFilter(IPC::ChannelProxy::MessageFilter* message_filter,
base::MessageLoop::current()->RunUntilIdle();
}
-void AddEventsToFilter(IPC::ChannelProxy::MessageFilter* message_filter,
+void AddEventsToFilter(IPC::MessageFilter* message_filter,
const WebMouseEvent events[],
size_t count) {
std::vector<IPC::Message> messages;
diff --git a/content/renderer/media/android/renderer_demuxer_android.cc b/content/renderer/media/android/renderer_demuxer_android.cc
index ab139b5..b7d6a26 100644
--- a/content/renderer/media/android/renderer_demuxer_android.cc
+++ b/content/renderer/media/android/renderer_demuxer_android.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
+#include "base/message_loop/message_loop_proxy.h"
#include "content/child/thread_safe_sender.h"
#include "content/common/media/media_player_messages_android.h"
#include "content/renderer/media/android/media_source_delegate.h"
diff --git a/content/renderer/media/android/renderer_demuxer_android.h b/content/renderer/media/android/renderer_demuxer_android.h
index c6538a1..b1dac131 100644
--- a/content/renderer/media/android/renderer_demuxer_android.h
+++ b/content/renderer/media/android/renderer_demuxer_android.h
@@ -7,9 +7,13 @@
#include "base/atomic_sequence_num.h"
#include "base/id_map.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "media/base/android/demuxer_stream_player_params.h"
+namespace base {
+class MessageLoopProxy;
+}
+
namespace content {
class MediaSourceDelegate;
@@ -19,7 +23,7 @@ class ThreadSafeSender;
// media::DemuxerAndroid.
//
// Refer to BrowserDemuxerAndroid for the browser process half.
-class RendererDemuxerAndroid : public IPC::ChannelProxy::MessageFilter {
+class RendererDemuxerAndroid : public IPC::MessageFilter {
public:
RendererDemuxerAndroid();
@@ -39,7 +43,7 @@ class RendererDemuxerAndroid : public IPC::ChannelProxy::MessageFilter {
// Must be called on media thread.
void RemoveDelegate(int demuxer_client_id);
- // IPC::ChannelProxy::MessageFilter overrides.
+ // IPC::MessageFilter overrides.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// media::DemuxerAndroidClient "implementation".
diff --git a/content/renderer/media/audio_input_message_filter.cc b/content/renderer/media/audio_input_message_filter.cc
index a2696f0..11928ea 100644
--- a/content/renderer/media/audio_input_message_filter.cc
+++ b/content/renderer/media/audio_input_message_filter.cc
@@ -9,6 +9,7 @@
#include "base/strings/stringprintf.h"
#include "content/common/media/audio_messages.h"
#include "content/renderer/media/webrtc_logging.h"
+#include "ipc/ipc_channel.h"
#include "ipc/ipc_logging.h"
namespace content {
diff --git a/content/renderer/media/audio_input_message_filter.h b/content/renderer/media/audio_input_message_filter.h
index 023d090..82b4dd0 100644
--- a/content/renderer/media/audio_input_message_filter.h
+++ b/content/renderer/media/audio_input_message_filter.h
@@ -10,7 +10,7 @@
#include "base/memory/shared_memory.h"
#include "base/sync_socket.h"
#include "content/common/content_export.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "media/audio/audio_input_ipc.h"
namespace base {
@@ -23,8 +23,7 @@ namespace content {
// audio capturers. Created on render thread, AudioMessageFilter is operated on
// IO thread (secondary thread of render process), it intercepts audio messages
// and process them on IO thread since these messages are time critical.
-class CONTENT_EXPORT AudioInputMessageFilter
- : public IPC::ChannelProxy::MessageFilter {
+class CONTENT_EXPORT AudioInputMessageFilter : public IPC::MessageFilter {
public:
explicit AudioInputMessageFilter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
@@ -53,7 +52,7 @@ class CONTENT_EXPORT AudioInputMessageFilter
// Sends an IPC message using |channel_|.
void Send(IPC::Message* message);
- // IPC::ChannelProxy::MessageFilter override. Called on |io_message_loop_|.
+ // IPC::MessageFilter override. Called on |io_message_loop_|.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
diff --git a/content/renderer/media/audio_message_filter.h b/content/renderer/media/audio_message_filter.h
index d4d953c..2892bb9 100644
--- a/content/renderer/media/audio_message_filter.h
+++ b/content/renderer/media/audio_message_filter.h
@@ -12,7 +12,7 @@
#include "base/sync_socket.h"
#include "base/synchronization/lock.h"
#include "content/common/content_export.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "media/audio/audio_output_ipc.h"
#include "media/base/audio_hardware_config.h"
@@ -26,8 +26,7 @@ namespace content {
// renderers. Created on render thread, AudioMessageFilter is operated on
// IO thread (secondary thread of render process) it intercepts audio messages
// and process them on IO thread since these messages are time critical.
-class CONTENT_EXPORT AudioMessageFilter
- : public IPC::ChannelProxy::MessageFilter {
+class CONTENT_EXPORT AudioMessageFilter : public IPC::MessageFilter {
public:
explicit AudioMessageFilter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
@@ -69,7 +68,7 @@ class CONTENT_EXPORT AudioMessageFilter
// Sends an IPC message using |channel_|.
void Send(IPC::Message* message);
- // IPC::ChannelProxy::MessageFilter override. Called on |io_message_loop|.
+ // IPC::MessageFilter override. Called on |io_message_loop|.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
diff --git a/content/renderer/media/midi_message_filter.h b/content/renderer/media/midi_message_filter.h
index c7a4441..8e1a7b6 100644
--- a/content/renderer/media/midi_message_filter.h
+++ b/content/renderer/media/midi_message_filter.h
@@ -10,7 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "media/midi/midi_port_info.h"
#include "third_party/WebKit/public/platform/WebMIDIAccessorClient.h"
@@ -21,8 +21,7 @@ class MessageLoopProxy;
namespace content {
// MessageFilter that handles MIDI messages.
-class CONTENT_EXPORT MidiMessageFilter
- : public IPC::ChannelProxy::MessageFilter {
+class CONTENT_EXPORT MidiMessageFilter : public IPC::MessageFilter {
public:
explicit MidiMessageFilter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
@@ -53,7 +52,7 @@ class CONTENT_EXPORT MidiMessageFilter
// Sends an IPC message using |channel_|.
void Send(IPC::Message* message);
- // IPC::ChannelProxy::MessageFilter override. Called on |io_message_loop|.
+ // IPC::MessageFilter override. Called on |io_message_loop|.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
diff --git a/content/renderer/media/video_capture_message_filter.cc b/content/renderer/media/video_capture_message_filter.cc
index 9fd3914..78d25e7 100644
--- a/content/renderer/media/video_capture_message_filter.cc
+++ b/content/renderer/media/video_capture_message_filter.cc
@@ -6,6 +6,7 @@
#include "content/common/media/video_capture_messages.h"
#include "content/common/view_messages.h"
+#include "ipc/ipc_channel.h"
namespace content {
diff --git a/content/renderer/media/video_capture_message_filter.h b/content/renderer/media/video_capture_message_filter.h
index c99408f..501eaf1 100644
--- a/content/renderer/media/video_capture_message_filter.h
+++ b/content/renderer/media/video_capture_message_filter.h
@@ -15,7 +15,7 @@
#include "base/memory/shared_memory.h"
#include "content/common/content_export.h"
#include "content/common/media/video_capture.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "media/video/capture/video_capture.h"
namespace gpu {
@@ -24,8 +24,7 @@ struct MailboxHolder;
namespace content {
-class CONTENT_EXPORT VideoCaptureMessageFilter
- : public IPC::ChannelProxy::MessageFilter {
+class CONTENT_EXPORT VideoCaptureMessageFilter : public IPC::MessageFilter {
public:
class CONTENT_EXPORT Delegate {
public:
@@ -79,7 +78,7 @@ class CONTENT_EXPORT VideoCaptureMessageFilter
// Send a message asynchronously.
virtual bool Send(IPC::Message* message);
- // IPC::ChannelProxy::MessageFilter override. Called on IO thread.
+ // IPC::MessageFilter override. Called on IO thread.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
diff --git a/content/renderer/p2p/socket_dispatcher.cc b/content/renderer/p2p/socket_dispatcher.cc
index 7844644..d6b0119 100644
--- a/content/renderer/p2p/socket_dispatcher.cc
+++ b/content/renderer/p2p/socket_dispatcher.cc
@@ -13,6 +13,7 @@
#include "content/renderer/p2p/network_list_observer.h"
#include "content/renderer/p2p/socket_client_impl.h"
#include "content/renderer/render_view_impl.h"
+#include "ipc/ipc_channel.h"
namespace content {
diff --git a/content/renderer/p2p/socket_dispatcher.h b/content/renderer/p2p/socket_dispatcher.h
index 5709e93..5bfd264 100644
--- a/content/renderer/p2p/socket_dispatcher.h
+++ b/content/renderer/p2p/socket_dispatcher.h
@@ -30,7 +30,7 @@
#include "base/synchronization/lock.h"
#include "content/common/content_export.h"
#include "content/common/p2p_socket_type.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "net/base/net_util.h"
namespace base {
@@ -48,8 +48,7 @@ class P2PAsyncAddressResolver;
class P2PSocketClientImpl;
class RenderViewImpl;
-class CONTENT_EXPORT P2PSocketDispatcher
- : public IPC::ChannelProxy::MessageFilter {
+class CONTENT_EXPORT P2PSocketDispatcher : public IPC::MessageFilter {
public:
explicit P2PSocketDispatcher(base::MessageLoopProxy* ipc_message_loop);
@@ -73,7 +72,7 @@ class CONTENT_EXPORT P2PSocketDispatcher
// Send a message asynchronously.
virtual void Send(IPC::Message* message);
- // IPC::ChannelProxy::MessageFilter override. Called on IO thread.
+ // IPC::MessageFilter override. Called on IO thread.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index ddff03f..58407c8 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -687,11 +687,11 @@ int RenderThreadImpl::GenerateRoutingID() {
return routing_id;
}
-void RenderThreadImpl::AddFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void RenderThreadImpl::AddFilter(IPC::MessageFilter* filter) {
channel()->AddFilter(filter);
}
-void RenderThreadImpl::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) {
+void RenderThreadImpl::RemoveFilter(IPC::MessageFilter* filter) {
channel()->RemoveFilter(filter);
}
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index df603be..65883c7 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -20,7 +20,6 @@
#include "content/common/content_export.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/public/renderer/render_thread.h"
-#include "ipc/ipc_channel_proxy.h"
#include "ui/gfx/native_widget_types.h"
#if defined(OS_MACOSX)
@@ -50,6 +49,7 @@ class ContextProvider;
namespace IPC {
class ForwardingMessageFilter;
+class MessageFilter;
}
namespace media {
@@ -136,8 +136,8 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE;
virtual void RemoveRoute(int32 routing_id) OVERRIDE;
virtual int GenerateRoutingID() OVERRIDE;
- virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE;
- virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE;
+ virtual void AddFilter(IPC::MessageFilter* filter) OVERRIDE;
+ virtual void RemoveFilter(IPC::MessageFilter* filter) OVERRIDE;
virtual void AddObserver(RenderProcessObserver* observer) OVERRIDE;
virtual void RemoveObserver(RenderProcessObserver* observer) OVERRIDE;
virtual void SetResourceDispatcherDelegate(
diff --git a/content/renderer/service_worker/embedded_worker_context_message_filter.h b/content/renderer/service_worker/embedded_worker_context_message_filter.h
index e3bffd2..1c618df 100644
--- a/content/renderer/service_worker/embedded_worker_context_message_filter.h
+++ b/content/renderer/service_worker/embedded_worker_context_message_filter.h
@@ -7,6 +7,10 @@
#include "content/child/child_message_filter.h"
+namespace base {
+class MessageLoopProxy;
+}
+
namespace content {
class EmbeddedWorkerContextMessageFilter : public ChildMessageFilter {
diff --git a/content/renderer/shared_worker/embedded_shared_worker_stub.h b/content/renderer/shared_worker/embedded_shared_worker_stub.h
index 98feff90..ab9b7ed 100644
--- a/content/renderer/shared_worker/embedded_shared_worker_stub.h
+++ b/content/renderer/shared_worker/embedded_shared_worker_stub.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H
#define CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H
+#include <vector>
+
#include "content/child/child_message_filter.h"
#include "content/child/scoped_child_process_reference.h"
#include "ipc/ipc_listener.h"
diff --git a/ipc/BUILD.gn b/ipc/BUILD.gn
index 0c91d2f..cccbb58 100644
--- a/ipc/BUILD.gn
+++ b/ipc/BUILD.gn
@@ -46,6 +46,10 @@ component("ipc") {
"ipc_sync_message.h",
"ipc_sync_message_filter.cc",
"ipc_sync_message_filter.h",
+ "message_filter.cc",
+ "message_filter.h",
+ "message_filter_router.cc",
+ "message_filter_router.h",
"param_traits_log_macros.h",
"param_traits_macros.h",
"param_traits_read_macros.h",
diff --git a/ipc/ipc.gypi b/ipc/ipc.gypi
index ba80e42..fd23fb0 100644
--- a/ipc/ipc.gypi
+++ b/ipc/ipc.gypi
@@ -53,6 +53,10 @@
'ipc_sync_message.h',
'ipc_sync_message_filter.cc',
'ipc_sync_message_filter.h',
+ 'message_filter.cc',
+ 'message_filter.h',
+ 'message_filter_router.cc',
+ 'message_filter_router.h',
'param_traits_log_macros.h',
'param_traits_macros.h',
'param_traits_read_macros.h',
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index d906dbf..7c96c83 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -2,140 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ipc/ipc_channel_proxy.h"
+
#include "base/bind.h"
#include "base/compiler_specific.h"
-#include "base/debug/trace_event.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
-#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_logging.h"
#include "ipc/ipc_message_macros.h"
-#include "ipc/ipc_message_start.h"
-#include "ipc/ipc_message_utils.h"
+#include "ipc/message_filter.h"
+#include "ipc/message_filter_router.h"
namespace IPC {
//------------------------------------------------------------------------------
-class ChannelProxy::Context::MessageFilterRouter {
- public:
- typedef std::vector<MessageFilter*> MessageFilters;
-
- MessageFilterRouter() {}
- ~MessageFilterRouter() {}
-
- void AddFilter(MessageFilter* filter) {
- // Determine if the filter should be applied to all messages, or only
- // messages of a certain class.
- std::vector<uint32> supported_message_classes;
- if (filter->GetSupportedMessageClasses(&supported_message_classes)) {
- DCHECK(!supported_message_classes.empty());
- for (size_t i = 0; i < supported_message_classes.size(); ++i) {
- const int message_class = supported_message_classes[i];
- DCHECK(ValidMessageClass(message_class));
- // Safely ignore repeated subscriptions to a given message class for the
- // current filter being added.
- if (!message_class_filters_[message_class].empty() &&
- message_class_filters_[message_class].back() == filter) {
- continue;
- }
- message_class_filters_[message_class].push_back(filter);
- }
- } else {
- global_filters_.push_back(filter);
- }
- }
-
- void RemoveFilter(MessageFilter* filter) {
- if (RemoveFilter(global_filters_, filter))
- return;
-
- for (size_t i = 0; i < arraysize(message_class_filters_); ++i)
- RemoveFilter(message_class_filters_[i], filter);
- }
-
- bool TryFilters(const Message& message) {
- if (TryFilters(global_filters_, message))
- return true;
-
- const int message_class = IPC_MESSAGE_CLASS(message);
- if (!ValidMessageClass(message_class))
- return false;
-
- return TryFilters(message_class_filters_[message_class], message);
- }
-
- void Clear() {
- global_filters_.clear();
- for (size_t i = 0; i < arraysize(message_class_filters_); ++i)
- message_class_filters_[i].clear();
- }
-
- private:
- static bool TryFilters(MessageFilters& filters, const IPC::Message& message) {
- for (size_t i = 0; i < filters.size(); ++i) {
- if (filters[i]->OnMessageReceived(message)) {
- return true;
- }
- }
- return false;
- }
-
- static bool RemoveFilter(MessageFilters& filters, MessageFilter* filter) {
- MessageFilters::iterator it =
- std::remove(filters.begin(), filters.end(), filter);
- if (it == filters.end())
- return false;
-
- filters.erase(it, filters.end());
- return true;
- }
-
- static bool ValidMessageClass(int message_class) {
- return message_class >= 0 && message_class < LastIPCMsgStart;
- }
-
- // List of global and selective filters; a given filter will exist in either
- // |message_global_filters_| OR |message_class_filters_|, but not both.
- // Note that |message_global_filters_| will be given first offering of any
- // given message. It's the filter implementer and installer's
- // responsibility to ensure that a filter is either global or selective to
- // ensure proper message filtering order.
- MessageFilters global_filters_;
- MessageFilters message_class_filters_[LastIPCMsgStart];
-};
-
-//------------------------------------------------------------------------------
-
-ChannelProxy::MessageFilter::MessageFilter() {}
-
-void ChannelProxy::MessageFilter::OnFilterAdded(Channel* channel) {}
-
-void ChannelProxy::MessageFilter::OnFilterRemoved() {}
-
-void ChannelProxy::MessageFilter::OnChannelConnected(int32 peer_pid) {}
-
-void ChannelProxy::MessageFilter::OnChannelError() {}
-
-void ChannelProxy::MessageFilter::OnChannelClosing() {}
-
-bool ChannelProxy::MessageFilter::OnMessageReceived(const Message& message) {
- return false;
-}
-
-bool ChannelProxy::MessageFilter::GetSupportedMessageClasses(
- std::vector<uint32>* /*supported_message_classes*/) const {
- return false;
-}
-
-ChannelProxy::MessageFilter::~MessageFilter() {}
-
-//------------------------------------------------------------------------------
-
ChannelProxy::Context::Context(Listener* listener,
base::SingleThreadTaskRunner* ipc_task_runner)
: listener_task_runner_(base::ThreadTaskRunnerHandle::Get()),
diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h
index b0247c4..375a42b 100644
--- a/ipc/ipc_channel_proxy.h
+++ b/ipc/ipc_channel_proxy.h
@@ -22,6 +22,8 @@ class SingleThreadTaskRunner;
namespace IPC {
+class MessageFilter;
+class MessageFilterRouter;
class SendCallbackHelper;
//-----------------------------------------------------------------------------
@@ -54,54 +56,6 @@ class SendCallbackHelper;
//
class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
public:
-
- // A class that receives messages on the thread where the IPC channel is
- // running. It can choose to prevent the default action for an IPC message.
- class IPC_EXPORT MessageFilter
- : public base::RefCountedThreadSafe<MessageFilter> {
- public:
- MessageFilter();
-
- // Called on the background thread to provide the filter with access to the
- // channel. Called when the IPC channel is initialized or when AddFilter
- // is called if the channel is already initialized.
- virtual void OnFilterAdded(Channel* channel);
-
- // Called on the background thread when the filter has been removed from
- // the ChannelProxy and when the Channel is closing. After a filter is
- // removed, it will not be called again.
- virtual void OnFilterRemoved();
-
- // Called to inform the filter that the IPC channel is connected and we
- // have received the internal Hello message from the peer.
- virtual void OnChannelConnected(int32 peer_pid);
-
- // Called when there is an error on the channel, typically that the channel
- // has been closed.
- virtual void OnChannelError();
-
- // Called to inform the filter that the IPC channel will be destroyed.
- // OnFilterRemoved is called immediately after this.
- virtual void OnChannelClosing();
-
- // Return true to indicate that the message was handled, or false to let
- // the message be handled in the default way.
- virtual bool OnMessageReceived(const Message& message);
-
- // Called to query the Message classes supported by the filter. Return
- // false to indicate that all message types should reach the filter, or true
- // if the resulting contents of |supported_message_classes| may be used to
- // selectively offer messages of a particular class to the filter.
- virtual bool GetSupportedMessageClasses(
- std::vector<uint32>* supported_message_classes) const;
-
- protected:
- virtual ~MessageFilter();
-
- private:
- friend class base::RefCountedThreadSafe<MessageFilter>;
- };
-
// Initializes a channel proxy. The channel_handle and mode parameters are
// passed directly to the underlying IPC::Channel. The listener is called on
// the thread that creates the ChannelProxy. The filter's OnMessageReceived
@@ -128,7 +82,7 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
// background thread processes the command to close the channel. It is ok to
// call this method multiple times. Redundant calls are ignored.
//
- // WARNING: The MessageFilter object held by the ChannelProxy is also
+ // WARNING: MessageFilter objects held by the ChannelProxy is also
// released asynchronously, and it may in fact have its final reference
// released on the background thread. The caller should be careful to deal
// with / allow for this possibility.
@@ -243,7 +197,6 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
// Routes a given message to a proper subset of |filters_|, depending
// on which message classes a filter might support.
- class MessageFilterRouter;
scoped_ptr<MessageFilterRouter> message_filter_router_;
// Holds filters between the AddFilter call on the listerner thread and the
diff --git a/ipc/ipc_channel_proxy_unittest.cc b/ipc/ipc_channel_proxy_unittest.cc
index 282b346..c5e078a 100644
--- a/ipc/ipc_channel_proxy_unittest.cc
+++ b/ipc/ipc_channel_proxy_unittest.cc
@@ -10,6 +10,7 @@
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_test_base.h"
+#include "ipc/message_filter.h"
namespace {
@@ -81,7 +82,7 @@ class ChannelReflectorListener : public IPC::Listener {
IPC::Channel* channel_;
};
-class MessageCountFilter : public IPC::ChannelProxy::MessageFilter {
+class MessageCountFilter : public IPC::MessageFilter {
public:
enum FilterEvent {
NONE,
diff --git a/ipc/ipc_forwarding_message_filter.cc b/ipc/ipc_forwarding_message_filter.cc
index 342aeb7..9857bdf 100644
--- a/ipc/ipc_forwarding_message_filter.cc
+++ b/ipc/ipc_forwarding_message_filter.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "ipc/ipc_message.h"
namespace IPC {
diff --git a/ipc/ipc_forwarding_message_filter.h b/ipc/ipc_forwarding_message_filter.h
index 919a44d..597fc60 100644
--- a/ipc/ipc_forwarding_message_filter.h
+++ b/ipc/ipc_forwarding_message_filter.h
@@ -12,7 +12,7 @@
#include "base/callback_forward.h"
#include "base/synchronization/lock.h"
#include "base/task_runner.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
namespace IPC {
@@ -23,7 +23,7 @@ namespace IPC {
//
// The user of this class implements ForwardingMessageFilter::Client,
// which will receive the intercepted messages, on the specified target thread.
-class IPC_EXPORT ForwardingMessageFilter : public ChannelProxy::MessageFilter {
+class IPC_EXPORT ForwardingMessageFilter : public MessageFilter {
public:
// The handler is invoked on the thread associated with
@@ -44,11 +44,10 @@ class IPC_EXPORT ForwardingMessageFilter : public ChannelProxy::MessageFilter {
void AddRoute(int routing_id, const Handler& handler);
void RemoveRoute(int routing_id);
- // ChannelProxy::MessageFilter methods:
+ // MessageFilter methods:
virtual bool OnMessageReceived(const Message& message) OVERRIDE;
private:
- friend class ChannelProxy::MessageFilter;
virtual ~ForwardingMessageFilter();
std::set<int> message_ids_to_filter_;
diff --git a/ipc/ipc_sync_message_filter.cc b/ipc/ipc_sync_message_filter.cc
index a534c44..3833d2b 100644
--- a/ipc/ipc_sync_message_filter.cc
+++ b/ipc/ipc_sync_message_filter.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/synchronization/waitable_event.h"
+#include "ipc/ipc_channel.h"
#include "ipc/ipc_sync_message.h"
using base::MessageLoopProxy;
diff --git a/ipc/ipc_sync_message_filter.h b/ipc/ipc_sync_message_filter.h
index dbc2834..4e08a1a 100644
--- a/ipc/ipc_sync_message_filter.h
+++ b/ipc/ipc_sync_message_filter.h
@@ -10,8 +10,9 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/ipc_sender.h"
#include "ipc/ipc_sync_message.h"
+#include "ipc/message_filter.h"
namespace base {
class MessageLoopProxy;
@@ -25,15 +26,14 @@ namespace IPC {
// support fancy features that SyncChannel does, such as handling recursion or
// receiving messages while waiting for a response. Note that this object can
// be used to send simultaneous synchronous messages from different threads.
-class IPC_EXPORT SyncMessageFilter : public ChannelProxy::MessageFilter,
- public Sender {
+class IPC_EXPORT SyncMessageFilter : public MessageFilter, public Sender {
public:
explicit SyncMessageFilter(base::WaitableEvent* shutdown_event);
// MessageSender implementation.
virtual bool Send(Message* message) OVERRIDE;
- // ChannelProxy::MessageFilter implementation.
+ // MessageFilter implementation.
virtual void OnFilterAdded(Channel* channel) OVERRIDE;
virtual void OnChannelError() OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
diff --git a/ipc/message_filter.cc b/ipc/message_filter.cc
new file mode 100644
index 0000000..7218126
--- /dev/null
+++ b/ipc/message_filter.cc
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ipc/message_filter.h"
+
+#include "base/memory/ref_counted.h"
+#include "ipc/ipc_channel.h"
+
+namespace IPC {
+
+MessageFilter::MessageFilter() {}
+
+void MessageFilter::OnFilterAdded(Channel* channel) {}
+
+void MessageFilter::OnFilterRemoved() {}
+
+void MessageFilter::OnChannelConnected(int32 peer_pid) {}
+
+void MessageFilter::OnChannelError() {}
+
+void MessageFilter::OnChannelClosing() {}
+
+bool MessageFilter::OnMessageReceived(const Message& message) {
+ return false;
+}
+
+bool MessageFilter::GetSupportedMessageClasses(
+ std::vector<uint32>* /*supported_message_classes*/) const {
+ return false;
+}
+
+MessageFilter::~MessageFilter() {}
+
+} // namespace IPC
diff --git a/ipc/message_filter.h b/ipc/message_filter.h
new file mode 100644
index 0000000..0371585
--- /dev/null
+++ b/ipc/message_filter.h
@@ -0,0 +1,67 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IPC_MESSAGE_FILTER_H_
+#define IPC_MESSAGE_FILTER_H_
+
+#include <vector>
+
+#include "base/memory/ref_counted.h"
+#include "ipc/ipc_export.h"
+
+namespace IPC {
+
+class Channel;
+class Message;
+
+// A class that receives messages on the thread where the IPC channel is
+// running. It can choose to prevent the default action for an IPC message.
+class IPC_EXPORT MessageFilter
+ : public base::RefCountedThreadSafe<MessageFilter> {
+ public:
+ MessageFilter();
+
+ // Called on the background thread to provide the filter with access to the
+ // channel. Called when the IPC channel is initialized or when AddFilter
+ // is called if the channel is already initialized.
+ virtual void OnFilterAdded(Channel* channel);
+
+ // Called on the background thread when the filter has been removed from
+ // the ChannelProxy and when the Channel is closing. After a filter is
+ // removed, it will not be called again.
+ virtual void OnFilterRemoved();
+
+ // Called to inform the filter that the IPC channel is connected and we
+ // have received the internal Hello message from the peer.
+ virtual void OnChannelConnected(int32 peer_pid);
+
+ // Called when there is an error on the channel, typically that the channel
+ // has been closed.
+ virtual void OnChannelError();
+
+ // Called to inform the filter that the IPC channel will be destroyed.
+ // OnFilterRemoved is called immediately after this.
+ virtual void OnChannelClosing();
+
+ // Return true to indicate that the message was handled, or false to let
+ // the message be handled in the default way.
+ virtual bool OnMessageReceived(const Message& message);
+
+ // Called to query the Message classes supported by the filter. Return
+ // false to indicate that all message types should reach the filter, or true
+ // if the resulting contents of |supported_message_classes| may be used to
+ // selectively offer messages of a particular class to the filter.
+ virtual bool GetSupportedMessageClasses(
+ std::vector<uint32>* supported_message_classes) const;
+
+ protected:
+ virtual ~MessageFilter();
+
+ private:
+ friend class base::RefCountedThreadSafe<MessageFilter>;
+};
+
+} // namespace IPC
+
+#endif // IPC_MESSAGE_FILTER_H_
diff --git a/ipc/message_filter_router.cc b/ipc/message_filter_router.cc
new file mode 100644
index 0000000..81e4028
--- /dev/null
+++ b/ipc/message_filter_router.cc
@@ -0,0 +1,92 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ipc/message_filter_router.h"
+
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_message_utils.h"
+#include "ipc/message_filter.h"
+
+namespace IPC {
+
+namespace {
+
+bool TryFiltersImpl(MessageFilterRouter::MessageFilters& filters,
+ const IPC::Message& message) {
+ for (size_t i = 0; i < filters.size(); ++i) {
+ if (filters[i]->OnMessageReceived(message)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+bool RemoveFilterImpl(MessageFilterRouter::MessageFilters& filters,
+ MessageFilter* filter) {
+ MessageFilterRouter::MessageFilters::iterator it =
+ std::remove(filters.begin(), filters.end(), filter);
+ if (it == filters.end())
+ return false;
+
+ filters.erase(it, filters.end());
+ return true;
+}
+
+bool ValidMessageClass(int message_class) {
+ return message_class >= 0 && message_class < LastIPCMsgStart;
+}
+
+} // namespace
+
+MessageFilterRouter::MessageFilterRouter() {}
+MessageFilterRouter::~MessageFilterRouter() {}
+
+void MessageFilterRouter::AddFilter(MessageFilter* filter) {
+ // Determine if the filter should be applied to all messages, or only
+ // messages of a certain class.
+ std::vector<uint32> supported_message_classes;
+ if (filter->GetSupportedMessageClasses(&supported_message_classes)) {
+ DCHECK(!supported_message_classes.empty());
+ for (size_t i = 0; i < supported_message_classes.size(); ++i) {
+ const int message_class = supported_message_classes[i];
+ DCHECK(ValidMessageClass(message_class));
+ // Safely ignore repeated subscriptions to a given message class for the
+ // current filter being added.
+ if (!message_class_filters_[message_class].empty() &&
+ message_class_filters_[message_class].back() == filter) {
+ continue;
+ }
+ message_class_filters_[message_class].push_back(filter);
+ }
+ } else {
+ global_filters_.push_back(filter);
+ }
+}
+
+void MessageFilterRouter::RemoveFilter(MessageFilter* filter) {
+ if (RemoveFilterImpl(global_filters_, filter))
+ return;
+
+ for (size_t i = 0; i < arraysize(message_class_filters_); ++i)
+ RemoveFilterImpl(message_class_filters_[i], filter);
+}
+
+bool MessageFilterRouter::TryFilters(const Message& message) {
+ if (TryFiltersImpl(global_filters_, message))
+ return true;
+
+ const int message_class = IPC_MESSAGE_CLASS(message);
+ if (!ValidMessageClass(message_class))
+ return false;
+
+ return TryFiltersImpl(message_class_filters_[message_class], message);
+}
+
+void MessageFilterRouter::Clear() {
+ global_filters_.clear();
+ for (size_t i = 0; i < arraysize(message_class_filters_); ++i)
+ message_class_filters_[i].clear();
+}
+
+} // namespace IPC
diff --git a/ipc/message_filter_router.h b/ipc/message_filter_router.h
new file mode 100644
index 0000000..183b8eb
--- /dev/null
+++ b/ipc/message_filter_router.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IPC_MESSAGE_FILTER_ROUTER_H_
+#define IPC_MESSAGE_FILTER_ROUTER_H_
+
+#include <vector>
+
+#include "ipc/ipc_message_start.h"
+
+namespace IPC {
+
+class Message;
+class MessageFilter;
+
+class MessageFilterRouter {
+ public:
+ typedef std::vector<MessageFilter*> MessageFilters;
+
+ MessageFilterRouter();
+ ~MessageFilterRouter();
+
+ void AddFilter(MessageFilter* filter);
+ void RemoveFilter(MessageFilter* filter);
+ bool TryFilters(const Message& message);
+ void Clear();
+
+ private:
+ // List of global and selective filters; a given filter will exist in either
+ // |message_global_filters_| OR |message_class_filters_|, but not both.
+ // Note that |message_global_filters_| will be given first offering of any
+ // given message. It's the filter implementer and installer's
+ // responsibility to ensure that a filter is either global or selective to
+ // ensure proper message filtering order.
+ MessageFilters global_filters_;
+ MessageFilters message_class_filters_[LastIPCMsgStart];
+};
+
+} // namespace IPC
+
+#endif // IPC_MESSAGE_FILTER_ROUTER_H_
diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc
index 3912e78..786c24d 100644
--- a/ppapi/proxy/dispatcher.cc
+++ b/ppapi/proxy/dispatcher.cc
@@ -14,6 +14,10 @@
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/var_serialization_rules.h"
+namespace IPC {
+class MessageFilter;
+}
+
namespace ppapi {
namespace proxy {
@@ -43,8 +47,7 @@ InterfaceProxy* Dispatcher::GetInterfaceProxy(ApiID id) {
return proxy;
}
-void Dispatcher::AddIOThreadMessageFilter(
- IPC::ChannelProxy::MessageFilter* filter) {
+void Dispatcher::AddIOThreadMessageFilter(IPC::MessageFilter* filter) {
// Our filter is refcounted. The channel will call the destruct method on the
// filter when the channel is done with it, so the corresponding Release()
// happens there.
diff --git a/ppapi/proxy/dispatcher.h b/ppapi/proxy/dispatcher.h
index 06483f7..68d67fe 100644
--- a/ppapi/proxy/dispatcher.h
+++ b/ppapi/proxy/dispatcher.h
@@ -13,7 +13,6 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/tracked_objects.h"
-#include "ipc/ipc_channel_proxy.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/ppp.h"
@@ -23,6 +22,10 @@
#include "ppapi/proxy/plugin_var_tracker.h"
#include "ppapi/shared_impl/api_id.h"
+namespace IPC {
+class MessageFilter;
+}
+
namespace ppapi {
namespace proxy {
@@ -60,7 +63,7 @@ class PPAPI_PROXY_EXPORT Dispatcher : public ProxyChannel {
InterfaceProxy* GetInterfaceProxy(ApiID id);
// Adds the given filter to the IO thread. Takes ownership of the pointer.
- void AddIOThreadMessageFilter(IPC::ChannelProxy::MessageFilter* filter);
+ void AddIOThreadMessageFilter(IPC::MessageFilter* filter);
// IPC::Listener implementation.
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h
index d66fecf..c1ba15f 100644
--- a/ppapi/proxy/host_dispatcher.h
+++ b/ppapi/proxy/host_dispatcher.h
@@ -12,7 +12,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/process/process.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "ipc/message_filter.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/proxy/dispatcher.h"
@@ -31,7 +31,7 @@ class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher {
//
// Note that there can be nested sync messages, so the begin/end status
// actually represents a stack of blocking messages.
- class SyncMessageStatusReceiver : public IPC::ChannelProxy::MessageFilter {
+ class SyncMessageStatusReceiver : public IPC::MessageFilter {
public:
// Notification that a sync message is about to be sent out.
virtual void BeginBlockOnSyncMessage() = 0;
diff --git a/ppapi/proxy/plugin_message_filter.cc b/ppapi/proxy/plugin_message_filter.cc
index 1a62d21..5652a43 100644
--- a/ppapi/proxy/plugin_message_filter.cc
+++ b/ppapi/proxy/plugin_message_filter.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/logging.h"
+#include "ipc/ipc_channel.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/resource_message_params.h"
#include "ppapi/proxy/resource_reply_thread_registrar.h"
diff --git a/ppapi/proxy/plugin_message_filter.h b/ppapi/proxy/plugin_message_filter.h
index 6469007..3b05089 100644
--- a/ppapi/proxy/plugin_message_filter.h
+++ b/ppapi/proxy/plugin_message_filter.h
@@ -9,8 +9,8 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_sender.h"
+#include "ipc/message_filter.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/proxy/ppapi_proxy_export.h"
@@ -25,9 +25,8 @@ class ResourceReplyThreadRegistrar;
//
// There is one instance of this class for each renderer channel (same as for
// the PluginDispatchers).
-class PPAPI_PROXY_EXPORT PluginMessageFilter
- : public IPC::ChannelProxy::MessageFilter,
- public IPC::Sender {
+class PPAPI_PROXY_EXPORT PluginMessageFilter : public IPC::MessageFilter,
+ public IPC::Sender {
public:
// |seen_instance_ids| is a pointer to a set that will be used to uniquify
// PP_Instances across all renderer channels. The same pointer should be
diff --git a/win8/viewer/metro_viewer_process_host.cc b/win8/viewer/metro_viewer_process_host.cc
index cb6a202..26fe38a 100644
--- a/win8/viewer/metro_viewer_process_host.cc
+++ b/win8/viewer/metro_viewer_process_host.cc
@@ -18,6 +18,7 @@
#include "base/time/time.h"
#include "base/win/scoped_comptr.h"
#include "base/win/windows_version.h"
+#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
#include "ui/aura/remote_window_tree_host_win.h"
diff --git a/win8/viewer/metro_viewer_process_host.h b/win8/viewer/metro_viewer_process_host.h
index 209a94c..a7dc9d4 100644
--- a/win8/viewer/metro_viewer_process_host.h
+++ b/win8/viewer/metro_viewer_process_host.h
@@ -12,6 +12,7 @@
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
+#include "ipc/message_filter.h"
#include "ui/gfx/native_widget_types.h"
namespace base {
@@ -20,6 +21,7 @@ class WaitableEvent;
}
namespace IPC {
+class ChannelProxy;
class Message;
}
@@ -82,11 +84,11 @@ class MetroViewerProcessHost : public IPC::Listener,
// proxy's background thread. This prevents consumers of
// MetroViewerProcessHost from having to pump messages on their own message
// loop.
- class InternalMessageFilter : public IPC::ChannelProxy::MessageFilter {
+ class InternalMessageFilter : public IPC::MessageFilter {
public:
InternalMessageFilter(MetroViewerProcessHost* owner);
- // IPC::ChannelProxy::MessageFilter implementation.
+ // IPC::MessageFilter implementation.
virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
private: