diff options
author | lazyboy <lazyboy@chromium.org> | 2015-06-02 10:47:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-02 17:48:53 +0000 |
commit | 7a4f1ceb18ffe6777d6a8b10b2db06e957187eba (patch) | |
tree | 6caf91defebb448420ccfadc547fac1514b02aea /extensions/shell/renderer | |
parent | b0459422d0c363d4c7208916f00eee74d0d503ea (diff) | |
download | chromium_src-7a4f1ceb18ffe6777d6a8b10b2db06e957187eba.zip chromium_src-7a4f1ceb18ffe6777d6a8b10b2db06e957187eba.tar.gz chromium_src-7a4f1ceb18ffe6777d6a8b10b2db06e957187eba.tar.bz2 |
Move guest view container message routing out of content/.
GuestViews used to receive messages through BrowserPlugin, this CL makes
GuestView message routing possible without BrowserPlugin. This is a
prerequisite for making <webview> pluginless.
BUG=330264
Test=None, internal change only.
Review URL: https://codereview.chromium.org/1161483004
Cr-Commit-Position: refs/heads/master@{#332430}
Diffstat (limited to 'extensions/shell/renderer')
-rw-r--r-- | extensions/shell/renderer/shell_content_renderer_client.cc | 13 | ||||
-rw-r--r-- | extensions/shell/renderer/shell_content_renderer_client.h | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/extensions/shell/renderer/shell_content_renderer_client.cc b/extensions/shell/renderer/shell_content_renderer_client.cc index 2646c28..88df15c 100644 --- a/extensions/shell/renderer/shell_content_renderer_client.cc +++ b/extensions/shell/renderer/shell_content_renderer_client.cc @@ -4,7 +4,6 @@ #include "extensions/shell/renderer/shell_content_renderer_client.h" -#include "components/guest_view/renderer/guest_view_container.h" #include "content/public/common/content_constants.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame_observer.h" @@ -16,10 +15,10 @@ #include "extensions/renderer/extension_frame_helper.h" #include "extensions/renderer/extension_helper.h" #include "extensions/renderer/guest_view/extensions_guest_view_container.h" +#include "extensions/renderer/guest_view/extensions_guest_view_container_dispatcher.h" #include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h" #include "extensions/shell/common/shell_extensions_client.h" #include "extensions/shell/renderer/shell_extensions_renderer_client.h" -#include "ipc/ipc_message_macros.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" #if !defined(DISABLE_NACL) @@ -57,6 +56,10 @@ void ShellContentRendererClient::RenderThreadStarted() { new Dispatcher(extension_dispatcher_delegate_.get())); thread->AddObserver(extension_dispatcher_.get()); + guest_view_container_dispatcher_.reset( + new ExtensionsGuestViewContainerDispatcher()); + thread->AddObserver(guest_view_container_dispatcher_.get()); + // TODO(jamescook): Init WebSecurityPolicy for chrome-extension: schemes. // See ChromeContentRendererClient for details. } @@ -96,12 +99,6 @@ blink::WebPlugin* ShellContentRendererClient::CreatePluginReplacement( return NULL; } -bool ShellContentRendererClient::ShouldForwardToGuestContainer( - const IPC::Message& msg) { - return (IPC_MESSAGE_CLASS(msg) == GuestViewMsgStart) || - (IPC_MESSAGE_CLASS(msg) == ExtensionsGuestViewMsgStart); -} - bool ShellContentRendererClient::WillSendRequest( blink::WebFrame* frame, ui::PageTransition transition_type, diff --git a/extensions/shell/renderer/shell_content_renderer_client.h b/extensions/shell/renderer/shell_content_renderer_client.h index c95e1e1..36392d5 100644 --- a/extensions/shell/renderer/shell_content_renderer_client.h +++ b/extensions/shell/renderer/shell_content_renderer_client.h @@ -15,6 +15,7 @@ namespace extensions { class Dispatcher; class DispatcherDelegate; class ExtensionsClient; +class ExtensionsGuestViewContainerDispatcher; class ShellExtensionsRendererClient; class ShellRendererMainDelegate; @@ -35,7 +36,6 @@ class ShellContentRendererClient : public content::ContentRendererClient { blink::WebPlugin* CreatePluginReplacement( content::RenderFrame* render_frame, const base::FilePath& plugin_path) override; - bool ShouldForwardToGuestContainer(const IPC::Message& msg) override; bool WillSendRequest(blink::WebFrame* frame, ui::PageTransition transition_type, const GURL& url, @@ -59,6 +59,8 @@ class ShellContentRendererClient : public content::ContentRendererClient { scoped_ptr<ShellExtensionsRendererClient> extensions_renderer_client_; scoped_ptr<DispatcherDelegate> extension_dispatcher_delegate_; scoped_ptr<Dispatcher> extension_dispatcher_; + scoped_ptr<ExtensionsGuestViewContainerDispatcher> + guest_view_container_dispatcher_; DISALLOW_COPY_AND_ASSIGN(ShellContentRendererClient); }; |