summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authornick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 20:12:12 +0000
committernick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 20:12:12 +0000
commit5cdd8fd8e343dbaa131256302eb338eeac7eb2aa (patch)
treec95bcb8907541f56dfeff6739e17af04ab7cd6f0 /content/renderer
parentf05966bbaca4477d86688492cc49afe8333dadde (diff)
downloadchromium_src-5cdd8fd8e343dbaa131256302eb338eeac7eb2aa.zip
chromium_src-5cdd8fd8e343dbaa131256302eb338eeac7eb2aa.tar.gz
chromium_src-5cdd8fd8e343dbaa131256302eb338eeac7eb2aa.tar.bz2
Under --site-per-process, route input events from parent process to child frames.
The chain of forwarding starts with an event, in blink, that had been not handled by the document node of a swapped-out frame. It comes into the RenderFrameImpl via the forwardInputEvent method of the blink::WebFrameClient interface. A new IPC message FrameHostMsg_ForwardInputEvent is sent from the renderer process of the parent frame to the browser process, where it is handled by the child frame's CrossProcessFrameConnector, which in turn forwards the event to the RWH hosting the child frame, where it's treated as an ordinary input event. Related blink change: http://codereview.chromium.org/138003011 The code here is modeled after existing code in BrowserPluginGuest. BUG=305811, 339659 TEST=loading chromium.org in an iframe under --site-per-process; verify hovering and typing into search box works properly Review URL: https://codereview.chromium.org/130433016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/render_frame_impl.cc4
-rw-r--r--content/renderer/render_frame_impl.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 5aa6180..b5c52da 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1629,6 +1629,10 @@ void RenderFrameImpl::showContextMenu(const blink::WebContextMenuData& data) {
Send(new FrameHostMsg_ContextMenu(routing_id_, params));
}
+void RenderFrameImpl::forwardInputEvent(const blink::WebInputEvent* event) {
+ Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
+}
+
void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) {
observers_.AddObserver(observer);
}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 48e564b..ba75851 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -26,6 +26,7 @@ struct FrameMsg_BuffersSwapped_Params;
struct FrameMsg_CompositorFrameSwapped_Params;
namespace blink {
+class WebInputEvent;
class WebMouseEvent;
struct WebCompositionUnderline;
struct WebContextMenuData;
@@ -326,6 +327,7 @@ class CONTENT_EXPORT RenderFrameImpl
virtual bool allowWebGL(blink::WebFrame* frame, bool default_value);
virtual void didLoseWebGLContext(blink::WebFrame* frame,
int arb_robustness_status_code);
+ virtual void forwardInputEvent(const blink::WebInputEvent* event);
// TODO(jam): move this to WebFrameClient
virtual void showContextMenu(const blink::WebContextMenuData& data);