diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-20 22:35:31 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-20 22:35:31 +0000 |
commit | c47317e98d6623ea0e40a2fcf60e13b9bcb03d4e (patch) | |
tree | 0b5b672655adda0cea63afa6c1b19e65157db433 /content/public | |
parent | 124f78b393c367c5f86b5d90cfee37f4dd1bfa8e (diff) | |
download | chromium_src-c47317e98d6623ea0e40a2fcf60e13b9bcb03d4e.zip chromium_src-c47317e98d6623ea0e40a2fcf60e13b9bcb03d4e.tar.gz chromium_src-c47317e98d6623ea0e40a2fcf60e13b9bcb03d4e.tar.bz2 |
Rename IPC Sender and Listener in ppapi, content/public, and content/renderer
This is the new name in preparation for deleting the backwards-compatible typedef.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10532162
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
19 files changed, 56 insertions, 53 deletions
diff --git a/content/public/browser/browser_child_process_host.h b/content/public/browser/browser_child_process_host.h index f15e139..75c776f 100644 --- a/content/public/browser/browser_child_process_host.h +++ b/content/public/browser/browser_child_process_host.h @@ -11,7 +11,7 @@ #include "build/build_config.h" #include "content/common/content_export.h" #include "content/public/common/process_type.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_sender.h" class CommandLine; class FilePath; @@ -24,7 +24,7 @@ struct ChildProcessData; // This represents child processes of the browser process, i.e. plugins. They // will get terminated at browser shutdown. -class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Message::Sender { +class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender { public: // Used to create a child process host. The delegate must outlive this object. static BrowserChildProcessHost* Create( diff --git a/content/public/browser/browser_child_process_host_delegate.h b/content/public/browser/browser_child_process_host_delegate.h index e028c9a..82c5b60d 100644 --- a/content/public/browser/browser_child_process_host_delegate.h +++ b/content/public/browser/browser_child_process_host_delegate.h @@ -7,13 +7,12 @@ #pragma once #include "content/common/content_export.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" namespace content { // Interface that all users of BrowserChildProcessHost need to provide. -class CONTENT_EXPORT BrowserChildProcessHostDelegate - : public IPC::Channel::Listener { +class CONTENT_EXPORT BrowserChildProcessHostDelegate : public IPC::Listener { public: virtual ~BrowserChildProcessHostDelegate() {} diff --git a/content/public/browser/browser_message_filter.cc b/content/public/browser/browser_message_filter.cc index 6e5b598..51eab11 100644 --- a/content/public/browser/browser_message_filter.cc +++ b/content/public/browser/browser_message_filter.cc @@ -98,7 +98,7 @@ base::TaskRunner* BrowserMessageFilter::OverrideTaskRunnerForMessage( } bool BrowserMessageFilter::CheckCanDispatchOnUI(const IPC::Message& message, - IPC::Message::Sender* sender) { + IPC::Sender* sender) { #if defined(OS_WIN) && !defined(USE_AURA) // On Windows there's a potential deadlock with sync messsages going in // a circle from browser -> plugin -> renderer -> browser. diff --git a/content/public/browser/browser_message_filter.h b/content/public/browser/browser_message_filter.h index 2bebdd0..03f432f 100644 --- a/content/public/browser/browser_message_filter.h +++ b/content/public/browser/browser_message_filter.h @@ -19,9 +19,9 @@ namespace content { // Base class for message filters in the browser process. You can receive and // send messages on any thread. -class CONTENT_EXPORT BrowserMessageFilter : - public IPC::ChannelProxy::MessageFilter, - public IPC::Message::Sender { +class CONTENT_EXPORT BrowserMessageFilter + : public IPC::ChannelProxy::MessageFilter, + public IPC::Sender { public: BrowserMessageFilter(); @@ -33,9 +33,8 @@ class CONTENT_EXPORT BrowserMessageFilter : // DON'T OVERRIDE THIS! Override the other version below. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - // IPC::Message::Sender implementation. Can be called on any thread. Can't - // send sync messages (since we don't want to block the browser on any other - // process). + // IPC::Sender implementation. Can be called on any thread. Can't send sync + // messages (since we don't want to block the browser on any other process). virtual bool Send(IPC::Message* message) OVERRIDE; // If you want the given message to be dispatched to your OnMessageReceived on @@ -69,7 +68,7 @@ class CONTENT_EXPORT BrowserMessageFilter : // Checks that the given message can be dispatched on the UI thread, depending // on the platform. If not, returns false and an error ot the sender. static bool CheckCanDispatchOnUI(const IPC::Message& message, - IPC::Message::Sender* sender); + IPC::Sender* sender); // Call this if a message couldn't be deserialized. This kills the renderer. // Can be called on any thread. diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h index a27e66f..6b128dc 100644 --- a/content/public/browser/render_process_host.h +++ b/content/public/browser/render_process_host.h @@ -11,7 +11,7 @@ #include "base/process_util.h" #include "content/common/content_export.h" #include "ipc/ipc_channel_proxy.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_sender.h" #include "ui/gfx/native_widget_types.h" #include "ui/surface/transport_dib.h" @@ -32,8 +32,8 @@ namespace content { // Interface that represents the browser side of the browser <-> renderer // communication channel. There will generally be one RenderProcessHost per // renderer process. -class CONTENT_EXPORT RenderProcessHost : public IPC::Message::Sender, - public IPC::Channel::Listener { +class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, + public IPC::Listener { public: typedef IDMap<RenderProcessHost>::iterator iterator; typedef IDMap<RenderWidgetHost>::const_iterator RenderWidgetHostsIterator; diff --git a/content/public/browser/render_view_host_observer.h b/content/public/browser/render_view_host_observer.h index a6a1734..ea12cff 100644 --- a/content/public/browser/render_view_host_observer.h +++ b/content/public/browser/render_view_host_observer.h @@ -6,7 +6,9 @@ #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_OBSERVER_H_ #pragma once -#include "ipc/ipc_channel.h" +#include "base/compiler_specific.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "content/common/content_export.h" class GURL; @@ -18,8 +20,8 @@ class RenderViewHostImpl; // An observer API implemented by classes which want to filter IPC messages from // RenderViewHost. -class CONTENT_EXPORT RenderViewHostObserver : public IPC::Channel::Listener, - public IPC::Message::Sender { +class CONTENT_EXPORT RenderViewHostObserver : public IPC::Listener, + public IPC::Sender { public: protected: @@ -40,10 +42,10 @@ class CONTENT_EXPORT RenderViewHostObserver : public IPC::Channel::Listener, // Notifies that a navigation is starting. virtual void Navigate(const GURL& url); - // 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* message) OVERRIDE; RenderViewHost* render_view_host() const; diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h index 5033d4d..61a7f3a 100644 --- a/content/public/browser/render_widget_host.h +++ b/content/public/browser/render_widget_host.h @@ -260,9 +260,8 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { // Called to notify the RenderWidget that it has been resized. virtual void WasResized() = 0; - // Access to the implementation's - // IPC::Channel::Listener::OnMessageReceived. Intended only for - // test code. + // Access to the implementation's IPC::Listener::OnMessageReceived. Intended + // only for test code. // Add a keyboard listener that can handle key presses without requiring // focus. diff --git a/content/public/browser/resource_dispatcher_host_delegate.cc b/content/public/browser/resource_dispatcher_host_delegate.cc index b3d9ea7..7301b61 100644 --- a/content/public/browser/resource_dispatcher_host_delegate.cc +++ b/content/public/browser/resource_dispatcher_host_delegate.cc @@ -70,7 +70,7 @@ bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource( void ResourceDispatcherHostDelegate::OnResponseStarted( net::URLRequest* request, ResourceResponse* response, - IPC::Message::Sender* sender) { + IPC::Sender* sender) { } void ResourceDispatcherHostDelegate::OnRequestRedirected( diff --git a/content/public/browser/resource_dispatcher_host_delegate.h b/content/public/browser/resource_dispatcher_host_delegate.h index d23c0da..f723356 100644 --- a/content/public/browser/resource_dispatcher_host_delegate.h +++ b/content/public/browser/resource_dispatcher_host_delegate.h @@ -105,7 +105,7 @@ class CONTENT_EXPORT ResourceDispatcherHostDelegate { virtual void OnResponseStarted( net::URLRequest* request, ResourceResponse* response, - IPC::Message::Sender* sender); + IPC::Sender* sender); // Informs the delegate that a request has been redirected. virtual void OnRequestRedirected( diff --git a/content/public/browser/utility_process_host.h b/content/public/browser/utility_process_host.h index 5b10b32..fa37006 100644 --- a/content/public/browser/utility_process_host.h +++ b/content/public/browser/utility_process_host.h @@ -9,7 +9,7 @@ #include "base/process_util.h" #include "content/common/content_export.h" #include "content/public/browser/browser_thread.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_sender.h" class FilePath; @@ -28,7 +28,7 @@ class UtilityProcessHostClient; // Note: If your class keeps a ptr to an object of this type, grab a weak ptr to // avoid a use after free since this object is deleted synchronously but the // client notification is asynchronous. See http://crbug.com/108871. -class UtilityProcessHost : public IPC::Message::Sender, +class UtilityProcessHost : public IPC::Sender, public base::SupportsWeakPtr<UtilityProcessHost> { public: // Used to create a utility process. diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h index 988968a..c64d159 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -9,7 +9,8 @@ #include "content/common/content_export.h" #include "content/public/browser/navigation_controller.h" #include "content/public/common/page_transition_types.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "webkit/glue/window_open_disposition.h" class WebContentsImpl; @@ -24,8 +25,8 @@ struct Referrer; // An observer API implemented by classes which are interested in various page // load events from WebContents. They also get a chance to filter IPC messages. -class CONTENT_EXPORT WebContentsObserver : public IPC::Channel::Listener, - public IPC::Message::Sender { +class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, + public IPC::Sender { public: // Only one of the two methods below will be called when a RVH is created for // a WebContents, depending on whether it's for an interstitial or not. @@ -119,10 +120,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Channel::Listener, // It is safe to delete 'this' from here. virtual void WebContentsDestroyed(WebContents* web_contents) {} - // 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* message) OVERRIDE; int routing_id() const; diff --git a/content/public/common/child_process_host.h b/content/public/common/child_process_host.h index 499ac2e..f04bb0a 100644 --- a/content/public/common/child_process_host.h +++ b/content/public/common/child_process_host.h @@ -19,7 +19,7 @@ class ChildProcessHostDelegate; // This represents a non-browser process. This can include traditional child // processes like plugins, or an embedder could even use this for long lived // processes that run independent of the browser process. -class CONTENT_EXPORT ChildProcessHost : public IPC::Message::Sender { +class CONTENT_EXPORT ChildProcessHost : public IPC::Sender { public: virtual ~ChildProcessHost() {} diff --git a/content/public/common/child_process_host_delegate.h b/content/public/common/child_process_host_delegate.h index 6d2b72a..6ae55c4 100644 --- a/content/public/common/child_process_host_delegate.h +++ b/content/public/common/child_process_host_delegate.h @@ -9,12 +9,12 @@ #include <string> #include "content/common/content_export.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" namespace content { // Interface that all users of ChildProcessHost need to provide. -class ChildProcessHostDelegate : public IPC::Channel::Listener { +class ChildProcessHostDelegate : public IPC::Listener { public: virtual ~ChildProcessHostDelegate() {} diff --git a/content/public/renderer/render_thread.h b/content/public/renderer/render_thread.h index 81db195..1d12f80 100644 --- a/content/public/renderer/render_thread.h +++ b/content/public/renderer/render_thread.h @@ -9,6 +9,7 @@ #include "base/shared_memory.h" #include "content/common/content_export.h" #include "ipc/ipc_channel_proxy.h" +#include "ipc/ipc_sender.h" #if defined(OS_WIN) #include <windows.h> @@ -30,7 +31,7 @@ namespace content { class RenderProcessObserver; class ResourceDispatcherDelegate; -class CONTENT_EXPORT RenderThread : public IPC::Message::Sender { +class CONTENT_EXPORT RenderThread : public IPC::Sender { public: // Returns the one render thread for this process. Note that this can only // be accessed when running on the render thread itself. @@ -47,7 +48,7 @@ class CONTENT_EXPORT RenderThread : public IPC::Message::Sender { // Called to add or remove a listener for a particular message routing ID. // These methods normally get delegated to a MessageRouter. - virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0; + virtual void AddRoute(int32 routing_id, IPC::Listener* listener) = 0; virtual void RemoveRoute(int32 routing_id) = 0; virtual int GenerateRoutingID() = 0; diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index b3e9744..c09a527 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h @@ -6,8 +6,9 @@ #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ #include "base/basictypes.h" +#include "base/string16.h" #include "content/common/content_export.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_sender.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityState.h" #include "ui/gfx/native_widget_types.h" @@ -39,7 +40,7 @@ namespace content { class RenderViewVisitor; -class CONTENT_EXPORT RenderView : public IPC::Message::Sender { +class CONTENT_EXPORT RenderView : public IPC::Sender { public: // Returns the RenderView containing the given WebView. static RenderView* FromWebView(WebKit::WebView* webview); diff --git a/content/public/renderer/render_view_observer.h b/content/public/renderer/render_view_observer.h index 3817e0b..6acafc1 100644 --- a/content/public/renderer/render_view_observer.h +++ b/content/public/renderer/render_view_observer.h @@ -7,8 +7,10 @@ #pragma once #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "content/common/content_export.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" +#include "ipc/ipc_sender.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" class RenderViewImpl; @@ -31,8 +33,8 @@ class RenderView; // Base class for objects that want to filter incoming IPCs, and also get // notified of changes to the frame. -class CONTENT_EXPORT RenderViewObserver : public IPC::Channel::Listener, - public IPC::Message::Sender { +class CONTENT_EXPORT RenderViewObserver : public IPC::Listener, + public IPC::Sender { public: // By default, observers will be deleted when the RenderView goes away. If // they want to outlive it, they can override this function. @@ -82,14 +84,14 @@ class CONTENT_EXPORT RenderViewObserver : public IPC::Channel::Listener, virtual void Navigate(const GURL& url) {} virtual void ClosePage() {} - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; protected: explicit RenderViewObserver(RenderView* render_view); virtual ~RenderViewObserver(); - // IPC::Message::Sender implementation. + // IPC::Sender implementation. virtual bool Send(IPC::Message* message) OVERRIDE; RenderView* render_view(); diff --git a/content/public/test/mock_render_thread.h b/content/public/test/mock_render_thread.h index 78ca811..8520e48 100644 --- a/content/public/test/mock_render_thread.h +++ b/content/public/test/mock_render_thread.h @@ -45,8 +45,7 @@ class MockRenderThread : public RenderThread { virtual IPC::SyncMessageFilter* GetSyncMessageFilter() OVERRIDE; virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() OVERRIDE; - virtual void AddRoute(int32 routing_id, - IPC::Channel::Listener* listener) OVERRIDE; + 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; @@ -143,7 +142,7 @@ class MockRenderThread : public RenderThread { // We only keep track of one Widget, we learn its pointer when it // adds a new route. We do not keep track of Widgets created with // OnMsgCreateWindow. - IPC::Channel::Listener* widget_; + IPC::Listener* widget_; // Routing id that will be assigned to a CreateWindow Widget. int32 new_window_routing_id_; diff --git a/content/public/test/render_view_fake_resources_test.h b/content/public/test/render_view_fake_resources_test.h index 6ea092f..03afab5 100644 --- a/content/public/test/render_view_fake_resources_test.h +++ b/content/public/test/render_view_fake_resources_test.h @@ -49,7 +49,7 @@ #include "base/message_loop.h" #include "content/public/renderer/content_renderer_client.h" #include "content/public/renderer/render_view_visitor.h" -#include "ipc/ipc_channel.h" +#include "ipc/ipc_listener.h" #include "testing/gtest/include/gtest/gtest.h" class MockRenderProcess; @@ -64,10 +64,10 @@ class WebHistoryItem; namespace content { class RenderViewFakeResourcesTest : public ::testing::Test, - public IPC::Channel::Listener, + public IPC::Listener, public RenderViewVisitor { public: - // IPC::Channel::Listener implementation. + // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // RenderViewVisitor implementation. diff --git a/content/public/utility/utility_thread.h b/content/public/utility/utility_thread.h index 4eb352a..bd2bda3 100644 --- a/content/public/utility/utility_thread.h +++ b/content/public/utility/utility_thread.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "content/common/content_export.h" -#include "ipc/ipc_message.h" +#include "ipc/ipc_sender.h" #if defined(OS_WIN) #include <windows.h> @@ -16,7 +16,7 @@ namespace content { -class CONTENT_EXPORT UtilityThread : public IPC::Message::Sender { +class CONTENT_EXPORT UtilityThread : public IPC::Sender { public: // Returns the one utility thread for this process. Note that this can only // be accessed when running on the utility thread itself. |