diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-28 16:17:23 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-28 16:17:23 +0000 |
commit | 44c49c9f1e003331995f06b79f43138b4264f8ed (patch) | |
tree | 036eea83eaffe12e86cca1061af3ce01f4235231 /content/browser/renderer_host | |
parent | 069910d68691e3b03ec6a673787c91af6f7c52ae (diff) | |
download | chromium_src-44c49c9f1e003331995f06b79f43138b4264f8ed.zip chromium_src-44c49c9f1e003331995f06b79f43138b4264f8ed.tar.gz chromium_src-44c49c9f1e003331995f06b79f43138b4264f8ed.tar.bz2 |
Move extension messages to their own file and add a RenderViewObserver to start moving the extension code out of RenderView.
TBR=aa
Review URL: http://codereview.chromium.org/6735004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79561 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host')
-rw-r--r-- | content/browser/renderer_host/render_view_host.cc | 16 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host.h | 4 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host_delegate.h | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index 13e9963..bf91d391 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -23,6 +23,7 @@ #include "chrome/common/bindings_policy.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/net/url_request_context_getter.h" #include "chrome/common/render_messages.h" #include "chrome/common/print_messages.h" @@ -565,7 +566,7 @@ int RenderViewHost::DownloadFavicon(const GURL& url, int image_size) { } void RenderViewHost::GetApplicationInfo(int32 page_id) { - Send(new ViewMsg_GetApplicationInfo(routing_id(), page_id)); + Send(new ExtensionMsg_GetApplicationInfo(routing_id(), page_id)); } void RenderViewHost::CaptureSnapshot() { @@ -772,10 +773,9 @@ bool RenderViewHost::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK) - IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionRequest, OnExtensionRequest) + IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnExtensionRequest) IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnMsgSelectionChanged) - IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage, - OnExtensionPostMessage) + IPC_MESSAGE_HANDLER(ExtensionHostMsg_PostMessage, OnExtensionPostMessage) IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications, OnAccessibilityNotifications) IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) @@ -1115,7 +1115,7 @@ void RenderViewHost::OnMsgWebUISend( } } - ViewHostMsg_DomMessage_Params params; + ExtensionHostMsg_DomMessage_Params params; params.name = message; if (value.get()) params.arguments.Swap(static_cast<ListValue*>(value.get())); @@ -1399,7 +1399,7 @@ void RenderViewHost::ForwardMessageFromExternalHost(const std::string& message, } void RenderViewHost::OnExtensionRequest( - const ViewHostMsg_DomMessage_Params& params) { + const ExtensionHostMsg_DomMessage_Params& params) { if (!ChildProcessSecurityPolicy::GetInstance()-> HasExtensionBindings(process()->id())) { // This can happen if someone uses window.open() to open an extension URL @@ -1414,8 +1414,8 @@ void RenderViewHost::OnExtensionRequest( void RenderViewHost::SendExtensionResponse(int request_id, bool success, const std::string& response, const std::string& error) { - Send(new ViewMsg_ExtensionResponse(routing_id(), request_id, success, - response, error)); + Send(new ExtensionMsg_Response( + routing_id(), request_id, success, response, error)); } void RenderViewHost::BlockExtensionRequest(int request_id) { diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h index d45c749..d40b8c7 100644 --- a/content/browser/renderer_host/render_view_host.h +++ b/content/browser/renderer_host/render_view_host.h @@ -39,10 +39,10 @@ class SkBitmap; class ViewMsg_Navigate; struct ContentSettings; struct ContextMenuParams; +struct ExtensionHostMsg_DomMessage_Params; struct MediaPlayerAction; struct ViewHostMsg_AccessibilityNotification_Params; struct ViewHostMsg_CreateWindow_Params; -struct ViewHostMsg_DomMessage_Params; struct ViewHostMsg_ShowPopup_Params; struct ViewMsg_Navigate_Params; struct WebApplicationInfo; @@ -602,7 +602,7 @@ class RenderViewHost : public RenderWidgetHost { const std::string& value); void OnMsgShouldCloseACK(bool proceed); - void OnExtensionRequest(const ViewHostMsg_DomMessage_Params& params); + void OnExtensionRequest(const ExtensionHostMsg_DomMessage_Params& params); void OnExtensionPostMessage(int port_id, const std::string& message); void OnAccessibilityNotifications( const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params); diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h index be8d04e..3fcc384 100644 --- a/content/browser/renderer_host/render_view_host_delegate.h +++ b/content/browser/renderer_host/render_view_host_delegate.h @@ -45,8 +45,8 @@ class SkBitmap; class SSLClientAuthHandler; class SSLAddCertHandler; class TabContents; +struct ExtensionHostMsg_DomMessage_Params; struct ViewHostMsg_CreateWindow_Params; -struct ViewHostMsg_DomMessage_Params; struct ViewHostMsg_FrameNavigate_Params; struct WebApplicationInfo; struct WebDropData; @@ -492,7 +492,7 @@ class RenderViewHostDelegate : public IPC::Channel::Listener { // A message was sent from HTML-based UI. // By default we ignore such messages. virtual void ProcessWebUIMessage( - const ViewHostMsg_DomMessage_Params& params) {} + const ExtensionHostMsg_DomMessage_Params& params) {} // A message for external host. By default we ignore such messages. // |receiver| can be a receiving script and |message| is any |