diff options
Diffstat (limited to 'content/common')
36 files changed, 135 insertions, 136 deletions
diff --git a/content/common/appcache/appcache_backend_proxy.h b/content/common/appcache/appcache_backend_proxy.h index 050c07d..86c6c5c 100644 --- a/content/common/appcache/appcache_backend_proxy.h +++ b/content/common/appcache/appcache_backend_proxy.h @@ -6,16 +6,15 @@ #define CONTENT_COMMON_APPCACHE_APPCACHE_BACKEND_PROXY_H_ #pragma once -#include "ipc/ipc_message.h" +#include "ipc/ipc_sender.h" #include "webkit/appcache/appcache_interfaces.h" // Sends appcache related messages to the main process. class AppCacheBackendProxy : public appcache::AppCacheBackend { public: - explicit AppCacheBackendProxy(IPC::Message::Sender* sender) - : sender_(sender) {} + explicit AppCacheBackendProxy(IPC::Sender* sender) : sender_(sender) {} - IPC::Message::Sender* sender() const { return sender_; } + IPC::Sender* sender() const { return sender_; } // AppCacheBackend methods virtual void RegisterHost(int host_id) OVERRIDE; @@ -44,7 +43,7 @@ class AppCacheBackendProxy : public appcache::AppCacheBackend { std::vector<appcache::AppCacheResourceInfo>* resource_infos) OVERRIDE; private: - IPC::Message::Sender* sender_; + IPC::Sender* sender_; }; #endif // CONTENT_COMMON_APPCACHE_APPCACHE_BACKEND_PROXY_H_ diff --git a/content/common/appcache/appcache_dispatcher.h b/content/common/appcache/appcache_dispatcher.h index 88f1455..63f58fe 100644 --- a/content/common/appcache/appcache_dispatcher.h +++ b/content/common/appcache/appcache_dispatcher.h @@ -8,22 +8,22 @@ #include <string> #include <vector> + #include "content/common/appcache/appcache_backend_proxy.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" #include "webkit/appcache/appcache_frontend_impl.h" // Dispatches appcache related messages sent to a child process from the // main browser process. There is one instance per child process. Messages // are dispatched on the main child thread. The ChildThread base class // creates an instance and delegates calls to it. -class AppCacheDispatcher : public IPC::Channel::Listener { +class AppCacheDispatcher : public IPC::Listener { public: - explicit AppCacheDispatcher(IPC::Message::Sender* sender) - : backend_proxy_(sender) {} + explicit AppCacheDispatcher(IPC::Sender* sender) : backend_proxy_(sender) {} AppCacheBackendProxy* backend_proxy() { return &backend_proxy_; } - // IPC::Channel::Listener implementation + // IPC::Listener implementation virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; private: diff --git a/content/common/child_process_host_impl.h b/content/common/child_process_host_impl.h index 3168c6c..378be0a 100644 --- a/content/common/child_process_host_impl.h +++ b/content/common/child_process_host_impl.h @@ -16,6 +16,7 @@ #include "base/memory/singleton.h" #include "base/shared_memory.h" #include "base/string16.h" +#include "ipc/ipc_listener.h" #include "content/public/common/child_process_host.h" class FilePath; @@ -27,7 +28,7 @@ class ChildProcessHostDelegate; // messages between the host and the child process. Users are responsible // for the actual launching and terminating of the child processes. class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost, - public IPC::Channel::Listener { + public IPC::Listener { public: virtual ~ChildProcessHostImpl(); @@ -60,7 +61,7 @@ class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost, explicit ChildProcessHostImpl(ChildProcessHostDelegate* delegate); - // IPC::Channel::Listener methods: + // IPC::Listener methods: virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; virtual void OnChannelError() OVERRIDE; diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc index 0e69c65..3f00f93 100644 --- a/content/common/child_thread.cc +++ b/content/common/child_thread.cc @@ -101,7 +101,7 @@ bool ChildThread::Send(IPC::Message* msg) { return channel_->Send(msg); } -void ChildThread::AddRoute(int32 routing_id, IPC::Channel::Listener* listener) { +void ChildThread::AddRoute(int32 routing_id, IPC::Listener* listener) { DCHECK(MessageLoop::current() == message_loop()); router_.AddRoute(routing_id, listener); @@ -113,7 +113,7 @@ void ChildThread::RemoveRoute(int32 routing_id) { router_.RemoveRoute(routing_id); } -IPC::Channel::Listener* ChildThread::ResolveRoute(int32 routing_id) { +IPC::Listener* ChildThread::ResolveRoute(int32 routing_id) { DCHECK(MessageLoop::current() == message_loop()); return router_.ResolveRoute(routing_id); diff --git a/content/common/child_thread.h b/content/common/child_thread.h index e12a3e1..fa39ebe 100644 --- a/content/common/child_thread.h +++ b/content/common/child_thread.h @@ -30,8 +30,7 @@ class WebFrame; } // The main thread of a child process derives from this class. -class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener, - public IPC::Message::Sender { +class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender { public: // Creates the thread. ChildThread(); @@ -39,14 +38,14 @@ class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener, explicit ChildThread(const std::string& channel_name); virtual ~ChildThread(); - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; // See documentation on MessageRouter for AddRoute and RemoveRoute - void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); + void AddRoute(int32 routing_id, IPC::Listener* listener); void RemoveRoute(int32 routing_id); - IPC::Channel::Listener* ResolveRoute(int32 routing_id); + IPC::Listener* ResolveRoute(int32 routing_id); IPC::SyncChannel* channel() { return channel_.get(); } @@ -111,7 +110,7 @@ class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener, private: void Init(); - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; virtual void OnChannelError() OVERRIDE; diff --git a/content/common/fileapi/file_system_dispatcher.h b/content/common/fileapi/file_system_dispatcher.h index 8da0ff3..fb029f0 100644 --- a/content/common/fileapi/file_system_dispatcher.h +++ b/content/common/fileapi/file_system_dispatcher.h @@ -12,8 +12,7 @@ #include "base/file_util_proxy.h" #include "base/id_map.h" #include "base/process.h" -#include "ipc/ipc_channel.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_listener.h" #include "ipc/ipc_platform_file.h" #include "webkit/fileapi/file_system_callback_dispatcher.h" #include "webkit/fileapi/file_system_types.h" @@ -28,12 +27,12 @@ class GURL; // Dispatches and sends file system related messages sent to/from a child // process from/to the main browser process. There is one instance // per child process. Messages are dispatched on the main child thread. -class FileSystemDispatcher : public IPC::Channel::Listener { +class FileSystemDispatcher : public IPC::Listener { public: FileSystemDispatcher(); virtual ~FileSystemDispatcher(); - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; bool OpenFileSystem(const GURL& origin_url, diff --git a/content/common/font_cache_dispatcher_win.h b/content/common/font_cache_dispatcher_win.h index 06750b9..485975a 100644 --- a/content/common/font_cache_dispatcher_win.h +++ b/content/common/font_cache_dispatcher_win.h @@ -16,12 +16,12 @@ // 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::Message::Sender { + public IPC::Sender { public: FontCacheDispatcher(); virtual ~FontCacheDispatcher(); - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* message) OVERRIDE; private: diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc index 1c762dc..0e1aa3a 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.cc +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc @@ -530,7 +530,7 @@ bool CommandBufferProxyImpl::Send(IPC::Message* msg) { } // Callee takes ownership of message, regardless of whether Send is - // successful. See IPC::Message::Sender. + // successful. See IPC::Sender. delete msg; return false; } diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h index 8c09486..c569572 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.h +++ b/content/common/gpu/client/command_buffer_proxy_impl.h @@ -22,8 +22,7 @@ #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" #include "gpu/command_buffer/common/command_buffer.h" #include "gpu/command_buffer/common/command_buffer_shared.h" -#include "ipc/ipc_channel.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_listener.h" class GpuChannelHost; struct GPUCommandBufferConsoleMessage; @@ -37,7 +36,7 @@ class SharedMemory; // CommandBufferStub. class CommandBufferProxyImpl : public CommandBufferProxy, - public IPC::Channel::Listener, + public IPC::Listener, public base::SupportsWeakPtr<CommandBufferProxyImpl> { public: typedef base::Callback<void( @@ -56,7 +55,7 @@ class CommandBufferProxyImpl media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client); - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; virtual void OnChannelError() OVERRIDE; diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc index 1307c17..cd5683f 100644 --- a/content/common/gpu/client/gpu_channel_host.cc +++ b/content/common/gpu/client/gpu_channel_host.cc @@ -101,7 +101,7 @@ bool GpuChannelHost::Send(IPC::Message* message) { } // Callee takes ownership of message, regardless of whether Send is - // successful. See IPC::Message::Sender. + // successful. See IPC::Sender. delete message; return false; } @@ -215,7 +215,7 @@ void GpuChannelHost::DestroyCommandBuffer( } void GpuChannelHost::AddRoute( - int route_id, base::WeakPtr<IPC::Channel::Listener> listener) { + int route_id, base::WeakPtr<IPC::Listener> listener) { DCHECK(MessageLoopProxy::current()); scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy(); @@ -243,7 +243,7 @@ GpuChannelHost::MessageFilter::~MessageFilter() {} void GpuChannelHost::MessageFilter::AddRoute( int route_id, - base::WeakPtr<IPC::Channel::Listener> listener, + base::WeakPtr<IPC::Listener> listener, scoped_refptr<MessageLoopProxy> loop) { DCHECK(parent_->factory_->IsIOThread()); DCHECK(listeners_.find(route_id) == listeners_.end()); @@ -276,7 +276,7 @@ bool GpuChannelHost::MessageFilter::OnMessageReceived( info.loop->PostTask( FROM_HERE, base::Bind( - base::IgnoreResult(&IPC::Channel::Listener::OnMessageReceived), + base::IgnoreResult(&IPC::Listener::OnMessageReceived), info.listener, message)); } @@ -294,7 +294,7 @@ void GpuChannelHost::MessageFilter::OnChannelError() { const GpuListenerInfo& info = it->second; info.loop->PostTask( FROM_HERE, - base::Bind(&IPC::Channel::Listener::OnChannelError, info.listener)); + base::Bind(&IPC::Listener::OnChannelError, info.listener)); } listeners_.clear(); diff --git a/content/common/gpu/client/gpu_channel_host.h b/content/common/gpu/client/gpu_channel_host.h index 71cbf06..04e8615 100644 --- a/content/common/gpu/client/gpu_channel_host.h +++ b/content/common/gpu/client/gpu_channel_host.h @@ -47,7 +47,7 @@ struct GpuListenerInfo { GpuListenerInfo(); ~GpuListenerInfo(); - base::WeakPtr<IPC::Channel::Listener> listener; + base::WeakPtr<IPC::Listener> listener; scoped_refptr<base::MessageLoopProxy> loop; }; @@ -69,7 +69,7 @@ class CONTENT_EXPORT GpuChannelHostFactory { // Encapsulates an IPC channel between the client and one GPU process. // On the GPU process side there's a corresponding GpuChannel. -class GpuChannelHost : public IPC::Message::Sender, +class GpuChannelHost : public IPC::Sender, public base::RefCountedThreadSafe<GpuChannelHost> { public: enum State { @@ -101,7 +101,7 @@ class GpuChannelHost : public IPC::Message::Sender, void OnChannelError(); - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; // Create and connect to a command buffer in the GPU process. @@ -133,7 +133,7 @@ class GpuChannelHost : public IPC::Message::Sender, void DestroyCommandBuffer(CommandBufferProxy* command_buffer); // Add a route for the current message loop. - void AddRoute(int route_id, base::WeakPtr<IPC::Channel::Listener> listener); + void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); void RemoveRoute(int route_id); GpuChannelHostFactory* factory() const { return factory_; } @@ -152,7 +152,7 @@ class GpuChannelHost : public IPC::Message::Sender, explicit MessageFilter(GpuChannelHost* parent); void AddRoute(int route_id, - base::WeakPtr<IPC::Channel::Listener> listener, + base::WeakPtr<IPC::Listener> listener, scoped_refptr<base::MessageLoopProxy> loop); void RemoveRoute(int route_id); diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.h b/content/common/gpu/client/gpu_video_decode_accelerator_host.h index 5a0bd78..0339e0f 100644 --- a/content/common/gpu/client/gpu_video_decode_accelerator_host.h +++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.h @@ -9,7 +9,7 @@ #include "base/memory/weak_ptr.h" #include "base/threading/non_thread_safe.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" #include "media/video/video_decode_accelerator.h" class GpuChannelHost; @@ -17,7 +17,7 @@ class GpuChannelHost; // This class is used to talk to VideoDecodeAccelerator in the Gpu process // through IPC messages. class GpuVideoDecodeAcceleratorHost - : public IPC::Channel::Listener, + : public IPC::Listener, public media::VideoDecodeAccelerator, public base::NonThreadSafe, public base::SupportsWeakPtr<GpuVideoDecodeAcceleratorHost> { @@ -27,7 +27,7 @@ class GpuVideoDecodeAcceleratorHost int32 decoder_route_id, media::VideoDecodeAccelerator::Client* client); - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual void OnChannelError() OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index bd0468f..51cd9d7 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -358,7 +358,7 @@ int GpuChannel::GenerateRouteID() { return ++last_id; } -void GpuChannel::AddRoute(int32 route_id, IPC::Channel::Listener* listener) { +void GpuChannel::AddRoute(int32 route_id, IPC::Listener* listener) { router_.AddRoute(route_id, listener); } diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h index acaae1a..d9f90f7 100644 --- a/content/common/gpu/gpu_channel.h +++ b/content/common/gpu/gpu_channel.h @@ -39,8 +39,8 @@ struct RefCountedCounter; // Encapsulates an IPC channel between the GPU process and one renderer // process. On the renderer side there's a corresponding GpuChannelHost. -class GpuChannel : public IPC::Channel::Listener, - public IPC::Message::Sender, +class GpuChannel : public IPC::Listener, + public IPC::Sender, public base::RefCountedThreadSafe<GpuChannel> { public: // Takes ownership of the renderer process handle. @@ -68,11 +68,11 @@ class GpuChannel : public IPC::Channel::Listener, base::ProcessId renderer_pid() const { return channel_->peer_pid(); } - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; virtual void OnChannelError() OVERRIDE; - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; virtual void AppendAllCommandBufferStubs( @@ -103,7 +103,7 @@ class GpuChannel : public IPC::Channel::Listener, int GenerateRouteID(); // Called to add/remove a listener for a particular message routing ID. - void AddRoute(int32 route_id, IPC::Channel::Listener* listener); + void AddRoute(int32 route_id, IPC::Listener* listener); void RemoveRoute(int32 route_id); gpu::RefCountedCounter* MessagesPendingCount() { diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc index a9789ff..5978b2e 100644 --- a/content/common/gpu/gpu_channel_manager.cc +++ b/content/common/gpu/gpu_channel_manager.cc @@ -43,8 +43,7 @@ int GpuChannelManager::GenerateRouteID() { return ++last_id; } -void GpuChannelManager::AddRoute(int32 routing_id, - IPC::Channel::Listener* listener) { +void GpuChannelManager::AddRoute(int32 routing_id, IPC::Listener* listener) { gpu_child_thread_->AddRoute(routing_id, listener); } diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h index 53e255f..735895e 100644 --- a/content/common/gpu/gpu_channel_manager.h +++ b/content/common/gpu/gpu_channel_manager.h @@ -12,8 +12,8 @@ #include "base/message_loop_proxy.h" #include "build/build_config.h" #include "content/common/gpu/gpu_memory_manager.h" -#include "ipc/ipc_channel.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "ui/gfx/native_widget_types.h" namespace base { @@ -47,11 +47,11 @@ class SyncPointManager; // A GpuChannelManager can also be hosted in the browser process in single // process or in-process GPU modes. In this case there is no corresponding // GpuChildThread and this is the reason the GpuChildThread is referenced via -// a pointer to IPC::Message::Sender, which can be implemented by other hosts -// to send IPC messages to the browser process IO thread on the -// GpuChannelManager's behalf. -class GpuChannelManager : public IPC::Channel::Listener, - public IPC::Message::Sender, +// a pointer to IPC::Sender, which can be implemented by other hosts to send +// IPC messages to the browser process IO thread on the GpuChannelManager's +// behalf. +class GpuChannelManager : public IPC::Listener, + public IPC::Sender, public GpuMemoryManagerClient { public: GpuChannelManager(ChildThread* gpu_child_thread, @@ -78,7 +78,7 @@ class GpuChannelManager : public IPC::Channel::Listener, base::WeakPtrFactory<GpuChannelManager> weak_factory_; int GenerateRouteID(); - void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); + void AddRoute(int32 routing_id, IPC::Listener* listener); void RemoveRoute(int32 routing_id); GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h index 1e0c0bf..eeb3c9b 100644 --- a/content/common/gpu/gpu_command_buffer_stub.h +++ b/content/common/gpu/gpu_command_buffer_stub.h @@ -21,8 +21,8 @@ #include "gpu/command_buffer/service/command_buffer_service.h" #include "gpu/command_buffer/service/context_group.h" #include "gpu/command_buffer/service/gpu_scheduler.h" -#include "ipc/ipc_channel.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/size.h" #include "ui/gl/gl_context.h" @@ -77,8 +77,8 @@ class CONTENT_EXPORT GpuCommandBufferStubBase { class GpuCommandBufferStub : public GpuCommandBufferStubBase, - public IPC::Channel::Listener, - public IPC::Message::Sender, + public IPC::Listener, + public IPC::Sender, public base::SupportsWeakPtr<GpuCommandBufferStub> { public: class DestructionObserver { @@ -106,10 +106,10 @@ class GpuCommandBufferStub virtual ~GpuCommandBufferStub(); - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; // GpuCommandBufferStubBase implementation: diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h index 019aa50..8b25024 100644 --- a/content/common/gpu/image_transport_surface.h +++ b/content/common/gpu/image_transport_surface.h @@ -84,7 +84,7 @@ class ImageTransportSurface { DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface); }; -class ImageTransportHelper : public IPC::Channel::Listener { +class ImageTransportHelper : public IPC::Listener { public: // Takes weak pointers to objects that outlive the helper. ImageTransportHelper(ImageTransportSurface* surface, @@ -96,7 +96,7 @@ class ImageTransportHelper : public IPC::Channel::Listener { bool Initialize(); void Destroy(); - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // Helper send functions. Caller fills in the surface specific params diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc index 935f806..32cf266 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc @@ -45,7 +45,7 @@ static bool MakeDecoderContextCurrent(gpu::gles2::GLES2Decoder* decoder) { } GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator( - IPC::Message::Sender* sender, + IPC::Sender* sender, int32 host_route_id, GpuCommandBufferStub* stub) : sender_(sender), diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h index e76a8ba..a20785a 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.h +++ b/content/common/gpu/media/gpu_video_decode_accelerator.h @@ -10,26 +10,26 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/shared_memory.h" -#include "ipc/ipc_channel.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "media/video/video_decode_accelerator.h" class GpuCommandBufferStub; class GpuVideoDecodeAccelerator - : public IPC::Channel::Listener, - public IPC::Message::Sender, + : public IPC::Listener, + public IPC::Sender, public media::VideoDecodeAccelerator::Client { public: // Each of the arguments to the constructor must outlive this object. // |stub->decoder()| will be made current around any operation that touches // the underlying VDA so that it can make GL calls safely. - GpuVideoDecodeAccelerator(IPC::Message::Sender* sender, + GpuVideoDecodeAccelerator(IPC::Sender* sender, int32 host_route_id, GpuCommandBufferStub* stub); virtual ~GpuVideoDecodeAccelerator(); - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // media::VideoDecodeAccelerator::Client implementation. @@ -68,7 +68,7 @@ class GpuVideoDecodeAccelerator void OnDestroy(); // Pointer to the IPC message sender. - IPC::Message::Sender* sender_; + IPC::Sender* sender_; // Message to Send() when initialization is done. Is only non-NULL during // initialization and is owned by the IPC channel underlying the diff --git a/content/common/indexed_db/indexed_db_message_filter.h b/content/common/indexed_db/indexed_db_message_filter.h index 57eed0f..dcfa744 100644 --- a/content/common/indexed_db/indexed_db_message_filter.h +++ b/content/common/indexed_db/indexed_db_message_filter.h @@ -14,7 +14,7 @@ class IndexedDBMessageFilter : public IPC::ChannelProxy::MessageFilter { public: IndexedDBMessageFilter(); - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; protected: diff --git a/content/common/message_router.cc b/content/common/message_router.cc index b019843..92523fae 100644 --- a/content/common/message_router.cc +++ b/content/common/message_router.cc @@ -4,6 +4,8 @@ #include "content/common/message_router.h" +#include "ipc/ipc_message.h" + MessageRouter::MessageRouter() { } @@ -22,8 +24,7 @@ bool MessageRouter::Send(IPC::Message* msg) { return false; } -void MessageRouter::AddRoute(int32 routing_id, - IPC::Channel::Listener* listener) { +void MessageRouter::AddRoute(int32 routing_id, IPC::Listener* listener) { routes_.AddWithID(listener, routing_id); } @@ -39,7 +40,7 @@ bool MessageRouter::OnMessageReceived(const IPC::Message& msg) { } bool MessageRouter::RouteMessage(const IPC::Message& msg) { - IPC::Channel::Listener* listener = ResolveRoute(msg.routing_id()); + IPC::Listener* listener = ResolveRoute(msg.routing_id()); if (!listener) return false; @@ -47,6 +48,6 @@ bool MessageRouter::RouteMessage(const IPC::Message& msg) { return true; } -IPC::Channel::Listener* MessageRouter::ResolveRoute(int32 routing_id) { +IPC::Listener* MessageRouter::ResolveRoute(int32 routing_id) { return routes_.Lookup(routing_id); } diff --git a/content/common/message_router.h b/content/common/message_router.h index d0d9c75..3a56dcf 100644 --- a/content/common/message_router.h +++ b/content/common/message_router.h @@ -7,7 +7,8 @@ #pragma once #include "base/id_map.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" // The MessageRouter handles all incoming messages sent to it by routing them // to the correct listener. Routing is based on the Message's routing ID. @@ -20,15 +21,14 @@ // Otherwise, the message is ignored if its routing ID is not equal to // MSG_ROUTING_CONTROL. // -// The MessageRouter supports the IPC::Message::Sender interface for outgoing -// messages, but does not define a meaningful implementation of it. The -// subclass of MessageRouter is intended to provide that if appropriate. +// The MessageRouter supports the IPC::Sender interface for outgoing messages, +// but does not define a meaningful implementation of it. The subclass of +// MessageRouter is intended to provide that if appropriate. // // The MessageRouter can be used as a concrete class provided its Send method // is not called and it does not receive any control messages. -class MessageRouter : public IPC::Channel::Listener, - public IPC::Message::Sender { +class MessageRouter : public IPC::Listener, public IPC::Sender { public: MessageRouter(); virtual ~MessageRouter(); @@ -36,7 +36,7 @@ class MessageRouter : public IPC::Channel::Listener, // Implemented by subclasses to handle control messages virtual bool OnControlMessageReceived(const IPC::Message& msg); - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; // Like OnMessageReceived, except it only handles routed messages. Returns @@ -44,18 +44,18 @@ class MessageRouter : public IPC::Channel::Listener, // that route id. virtual bool RouteMessage(const IPC::Message& msg); - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; // Called to add/remove a listener for a particular message routing ID. - void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); + void AddRoute(int32 routing_id, IPC::Listener* listener); void RemoveRoute(int32 routing_id); - IPC::Channel::Listener* ResolveRoute(int32 routing_id); + IPC::Listener* ResolveRoute(int32 routing_id); private: // A list of all listeners with assigned routing IDs. - IDMap<IPC::Channel::Listener> routes_; + IDMap<IPC::Listener> routes_; DISALLOW_COPY_AND_ASSIGN(MessageRouter); }; diff --git a/content/common/np_channel_base.cc b/content/common/np_channel_base.cc index c433502..007f7a1 100644 --- a/content/common/np_channel_base.cc +++ b/content/common/np_channel_base.cc @@ -191,7 +191,7 @@ void NPChannelBase::OnChannelConnected(int32 peer_pid) { } void NPChannelBase::AddRoute(int route_id, - IPC::Channel::Listener* listener, + IPC::Listener* listener, NPObjectBase* npobject) { if (npobject) { npobject_listeners_[route_id] = npobject; diff --git a/content/common/np_channel_base.h b/content/common/np_channel_base.h index 8bacac3..f987044 100644 --- a/content/common/np_channel_base.h +++ b/content/common/np_channel_base.h @@ -47,8 +47,8 @@ inline size_t hash_value(NPObject* const& ptr) { // Encapsulates an IPC channel between a renderer and another process. Used to // proxy access to NP objects. -class NPChannelBase : public IPC::Channel::Listener, - public IPC::Message::Sender, +class NPChannelBase : public IPC::Listener, + public IPC::Sender, public base::RefCountedThreadSafe<NPChannelBase> { public: @@ -58,8 +58,7 @@ class NPChannelBase : public IPC::Channel::Listener, // pass themselves for npobject). However the latter don't control the // lifetime of this object because we don't want a leak of an NPObject to // keep the channel around longer than necessary. - void AddRoute(int route_id, IPC::Channel::Listener* listener, - NPObjectBase* npobject); + void AddRoute(int route_id, IPC::Listener* listener, NPObjectBase* npobject); void RemoveRoute(int route_id); @@ -73,7 +72,7 @@ class NPChannelBase : public IPC::Channel::Listener, int GetExistingRouteForNPObjectStub(NPObject* npobject); - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; base::ProcessId peer_pid() { return channel_->peer_pid(); } @@ -135,7 +134,7 @@ class NPChannelBase : public IPC::Channel::Listener, // Implemented by derived classes to handle control messages virtual bool OnControlMessageReceived(const IPC::Message& msg); - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; virtual void OnChannelError() OVERRIDE; diff --git a/content/common/npobject_base.h b/content/common/npobject_base.h index e8dd6a9..0fc62cf 100644 --- a/content/common/npobject_base.h +++ b/content/common/npobject_base.h @@ -9,7 +9,7 @@ #define CONTENT_COMMON_NPOBJECT_BASE_H_ #pragma once -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" #include "third_party/npapi/bindings/npruntime.h" struct NPObject; @@ -22,7 +22,7 @@ class NPObjectBase { virtual NPObject* GetUnderlyingNPObject() = 0; // Returns the channel listener for this NPObjectBase instance. - virtual IPC::Channel::Listener* GetChannelListener() = 0; + virtual IPC::Listener* GetChannelListener() = 0; }; #endif // CONTENT_COMMON_NPOBJECT_BASE_H_ diff --git a/content/common/npobject_proxy.cc b/content/common/npobject_proxy.cc index 0ee801c..f2d93f5 100644 --- a/content/common/npobject_proxy.cc +++ b/content/common/npobject_proxy.cc @@ -51,8 +51,8 @@ NPObject* NPObjectProxy::GetUnderlyingNPObject() { return NULL; } -IPC::Channel::Listener* NPObjectProxy::GetChannelListener() { - return static_cast<IPC::Channel::Listener*>(this); +IPC::Listener* NPObjectProxy::GetChannelListener() { + return static_cast<IPC::Listener*>(this); } NPObjectProxy::NPObjectProxy( diff --git a/content/common/npobject_proxy.h b/content/common/npobject_proxy.h index 23e0183..5a2e742 100644 --- a/content/common/npobject_proxy.h +++ b/content/common/npobject_proxy.h @@ -12,7 +12,8 @@ #include "base/memory/ref_counted.h" #include "content/common/npobject_base.h" #include "googleurl/src/gurl.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "third_party/npapi/bindings/npruntime.h" #include "ui/gfx/native_widget_types.h" @@ -27,8 +28,8 @@ struct NPObject; // channel (specifically, a NPChannelBase). The NPObjectStub on the other // side translates the IPC messages into calls to the actual NPObject, and // returns the marshalled result. -class NPObjectProxy : public IPC::Channel::Listener, - public IPC::Message::Sender, +class NPObjectProxy : public IPC::Listener, + public IPC::Sender, public NPObjectBase { public: virtual ~NPObjectProxy(); @@ -38,7 +39,7 @@ class NPObjectProxy : public IPC::Channel::Listener, gfx::NativeViewId containing_window, const GURL& page_url); - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; int route_id() { return route_id_; } NPChannelBase* channel() { return channel_; } @@ -93,7 +94,7 @@ class NPObjectProxy : public IPC::Channel::Listener, // NPObjectBase implementation. virtual NPObject* GetUnderlyingNPObject() OVERRIDE; - virtual IPC::Channel::Listener* GetChannelListener() OVERRIDE; + virtual IPC::Listener* GetChannelListener() OVERRIDE; private: NPObjectProxy(NPChannelBase* channel, @@ -101,7 +102,7 @@ class NPObjectProxy : public IPC::Channel::Listener, gfx::NativeViewId containing_window, const GURL& page_url); - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; virtual void OnChannelError() OVERRIDE; diff --git a/content/common/npobject_stub.cc b/content/common/npobject_stub.cc index b6f28a7..03678a9 100644 --- a/content/common/npobject_stub.cc +++ b/content/common/npobject_stub.cc @@ -65,8 +65,8 @@ NPObject* NPObjectStub::GetUnderlyingNPObject() { return npobject_; } -IPC::Channel::Listener* NPObjectStub::GetChannelListener() { - return static_cast<IPC::Channel::Listener*>(this); +IPC::Listener* NPObjectStub::GetChannelListener() { + return static_cast<IPC::Listener*>(this); } bool NPObjectStub::OnMessageReceived(const IPC::Message& msg) { diff --git a/content/common/npobject_stub.h b/content/common/npobject_stub.h index 6721a6f..189fdab 100644 --- a/content/common/npobject_stub.h +++ b/content/common/npobject_stub.h @@ -15,7 +15,8 @@ #include "base/memory/weak_ptr.h" #include "content/common/npobject_base.h" #include "googleurl/src/gurl.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "ui/gfx/native_widget_types.h" class NPChannelBase; @@ -26,8 +27,8 @@ struct NPVariant_Param; // This wraps an NPObject and converts IPC messages from NPObjectProxy to calls // to the object. The results are marshalled back. See npobject_proxy.h for // more information. -class NPObjectStub : public IPC::Channel::Listener, - public IPC::Message::Sender, +class NPObjectStub : public IPC::Listener, + public IPC::Sender, public base::SupportsWeakPtr<NPObjectStub>, public NPObjectBase { public: @@ -45,15 +46,15 @@ class NPObjectStub : public IPC::Channel::Listener, // more than once, until control returns to the main loop. void DeleteSoon(); - // IPC::Message::Sender implementation: + // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; // NPObjectBase implementation. virtual NPObject* GetUnderlyingNPObject() OVERRIDE; - virtual IPC::Channel::Listener* GetChannelListener() OVERRIDE; + virtual IPC::Listener* GetChannelListener() OVERRIDE; private: - // IPC::Channel::Listener implementation: + // IPC::Listener implementation: virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; virtual void OnChannelError() OVERRIDE; diff --git a/content/common/quota_dispatcher.h b/content/common/quota_dispatcher.h index 1d1c262..f636623 100644 --- a/content/common/quota_dispatcher.h +++ b/content/common/quota_dispatcher.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/id_map.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" #include "webkit/quota/quota_types.h" class GURL; @@ -26,7 +26,7 @@ class WebStorageQuotaCallbacks; // Dispatches and sends quota related messages sent to/from a child // process from/to the main browser process. There is one instance // per child process. Messages are dispatched on the main child thread. -class QuotaDispatcher : public IPC::Channel::Listener { +class QuotaDispatcher : public IPC::Listener { public: class Callback { public: @@ -39,7 +39,7 @@ class QuotaDispatcher : public IPC::Channel::Listener { QuotaDispatcher(); virtual ~QuotaDispatcher(); - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; void QueryStorageUsageAndQuota(const GURL& gurl, diff --git a/content/common/resource_dispatcher.cc b/content/common/resource_dispatcher.cc index 7a6ac06..404558b 100644 --- a/content/common/resource_dispatcher.cc +++ b/content/common/resource_dispatcher.cc @@ -264,7 +264,7 @@ void IPCResourceLoaderBridge::SyncLoad(SyncLoadResponse* response) { // ResourceDispatcher --------------------------------------------------------- -ResourceDispatcher::ResourceDispatcher(IPC::Message::Sender* sender) +ResourceDispatcher::ResourceDispatcher(IPC::Sender* sender) : message_sender_(sender), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), delegate_(NULL) { diff --git a/content/common/resource_dispatcher.h b/content/common/resource_dispatcher.h index 7c5cdba..363fb78 100644 --- a/content/common/resource_dispatcher.h +++ b/content/common/resource_dispatcher.h @@ -17,7 +17,8 @@ #include "base/shared_memory.h" #include "base/time.h" #include "content/common/content_export.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "webkit/glue/resource_loader_bridge.h" namespace content { @@ -28,12 +29,12 @@ struct ResourceResponseHead; // This class serves as a communication interface between the // ResourceDispatcherHost in the browser process and the ResourceLoaderBridge in // the child process. It can be used from any child process. -class CONTENT_EXPORT ResourceDispatcher : public IPC::Channel::Listener { +class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener { public: - explicit ResourceDispatcher(IPC::Message::Sender* sender); + explicit ResourceDispatcher(IPC::Sender* sender); virtual ~ResourceDispatcher(); - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // Creates a ResourceLoaderBridge for this type of dispatcher, this is so @@ -55,7 +56,7 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Channel::Listener { // Cancels a request in the pending_requests_ list. void CancelPendingRequest(int routing_id, int request_id); - IPC::Message::Sender* message_sender() const { + IPC::Sender* message_sender() const { return message_sender_; } @@ -162,7 +163,7 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Channel::Listener { // for use on deferred message queues that are no longer needed. static void ReleaseResourcesInMessageQueue(MessageQueue* queue); - IPC::Message::Sender* message_sender_; + IPC::Sender* message_sender_; // All pending requests issued to the host PendingRequestList pending_requests_; diff --git a/content/common/resource_dispatcher_unittest.cc b/content/common/resource_dispatcher_unittest.cc index f66dc2e..cf31c3c 100644 --- a/content/common/resource_dispatcher_unittest.cc +++ b/content/common/resource_dispatcher_unittest.cc @@ -90,10 +90,9 @@ class TestRequestCallback : public ResourceLoaderBridge::Peer { // Sets up the message sender override for the unit test -class ResourceDispatcherTest : public testing::Test, - public IPC::Message::Sender { +class ResourceDispatcherTest : public testing::Test, public IPC::Sender { public: - // Emulates IPC send operations (IPC::Message::Sender) by adding + // Emulates IPC send operations (IPC::Sender) by adding // pending messages to the queue. virtual bool Send(IPC::Message* msg) { message_queue_.push_back(IPC::Message(*msg)); diff --git a/content/common/socket_stream_dispatcher.h b/content/common/socket_stream_dispatcher.h index 10d8680..fdc1880 100644 --- a/content/common/socket_stream_dispatcher.h +++ b/content/common/socket_stream_dispatcher.h @@ -9,7 +9,8 @@ #include <vector> #include "base/basictypes.h" -#include "ipc/ipc_channel.h" +#include "base/compiler_specific.h" +#include "ipc/ipc_listener.h" namespace WebKit { class WebSocketStreamHandle; @@ -24,7 +25,7 @@ class WebSocketStreamHandleDelegate; // main browser process. There is one instance per child process. Messages // are dispatched on the main child thread. The RenderThread class // creates an instance of SocketStreamDispatcher and delegates calls to it. -class SocketStreamDispatcher : public IPC::Channel::Listener { +class SocketStreamDispatcher : public IPC::Listener { public: SocketStreamDispatcher(); virtual ~SocketStreamDispatcher() {} @@ -33,7 +34,7 @@ class SocketStreamDispatcher : public IPC::Channel::Listener { WebKit::WebSocketStreamHandle* handle, webkit_glue::WebSocketStreamHandleDelegate* delegate); - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; private: diff --git a/content/common/webmessageportchannel_impl.h b/content/common/webmessageportchannel_impl.h index a47ba24..f7ff131 100644 --- a/content/common/webmessageportchannel_impl.h +++ b/content/common/webmessageportchannel_impl.h @@ -13,13 +13,13 @@ #include "base/memory/ref_counted.h" #include "base/string16.h" #include "base/synchronization/lock.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel.h" // This is thread safe. class WebMessagePortChannelImpl : public WebKit::WebMessagePortChannel, - public IPC::Channel::Listener, + public IPC::Listener, public base::RefCountedThreadSafe<WebMessagePortChannelImpl> { public: WebMessagePortChannelImpl(); @@ -47,7 +47,7 @@ class WebMessagePortChannelImpl void Entangle(scoped_refptr<WebMessagePortChannelImpl> channel); void Send(IPC::Message* message); - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; void OnMessage(const string16& message, |