Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1636)

Unified Diff: Source/web/ChromeClientImpl.cpp

Issue 642203002: Make input event forwarding work in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/ChromeClientImpl.cpp
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
index ee5bdbe1b2693ecb9f3d38f744f804418b04287b..94bbfa865cdb34bd68ed226a130659c8fe90863d 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -44,6 +44,8 @@
#include "core/events/WheelEvent.h"
#include "core/frame/Console.h"
#include "core/frame/FrameView.h"
+#include "core/frame/RemoteFrame.h"
+#include "core/frame/RemoteFrameView.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/forms/ColorChooser.h"
@@ -103,6 +105,7 @@
#include "web/WebLocalFrameImpl.h"
#include "web/WebPluginContainerImpl.h"
#include "web/WebPopupMenuImpl.h"
+#include "web/WebRemoteFrameImpl.h"
#include "web/WebSettingsImpl.h"
#include "web/WebViewImpl.h"
#include "wtf/text/CString.h"
@@ -845,14 +848,9 @@ void ChromeClientImpl::handleKeyboardEventOnTextField(HTMLInputElement& inputEle
// FIXME: Remove this code once we have input routing in the browser
// process. See http://crbug.com/339659.
void ChromeClientImpl::forwardInputEvent(
- Frame* frame, Event* event)
+ RemoteFrame* frame, Event* event)
{
- // FIXME: Input event forwarding to out-of-process frames is broken until
- // WebRemoteFrameImpl has a WebFrameClient.
- if (frame->isRemoteFrame())
- return;
-
- WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
+ WebRemoteFrameImpl* webFrame = WebRemoteFrameImpl::fromFrame(*frame);
// This is only called when we have out-of-process iframes, which
// need to forward input events across processes.
@@ -861,14 +859,13 @@ void ChromeClientImpl::forwardInputEvent(
WebKeyboardEventBuilder webEvent(*static_cast<KeyboardEvent*>(event));
webFrame->client()->forwardInputEvent(&webEvent);
} else if (event->isMouseEvent()) {
- WebMouseEventBuilder webEvent(webFrame->frameView(), frame->ownerRenderer(), *static_cast<MouseEvent*>(event));
+ WebMouseEventBuilder webEvent(webFrame->frame()->view(), frame->ownerRenderer(), *static_cast<MouseEvent*>(event));
// Internal Blink events should not be forwarded.
if (webEvent.type == WebInputEvent::Undefined)
return;
-
webFrame->client()->forwardInputEvent(&webEvent);
} else if (event->isWheelEvent()) {
- WebMouseWheelEventBuilder webEvent(webFrame->frameView(), frame->ownerRenderer(), *static_cast<WheelEvent*>(event));
+ WebMouseWheelEventBuilder webEvent(webFrame->frame()->view(), frame->ownerRenderer(), *static_cast<WheelEvent*>(event));
if (webEvent.type == WebInputEvent::Undefined)
return;
webFrame->client()->forwardInputEvent(&webEvent);

Powered by Google App Engine
This is Rietveld 408576698