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

Unified Diff: content/browser/frame_host/cross_process_frame_connector.cc

Issue 1729373003: Implement touch events for site-isolation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add non-NaN force to touch event. Created 4 years, 10 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: content/browser/frame_host/cross_process_frame_connector.cc
diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc
index d945a2ff74be682834bd061810b962212b1d0f5f..80fa99416a46fd408d2ce03ce3e6e4e4376c8a49 100644
--- a/content/browser/frame_host/cross_process_frame_connector.cc
+++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -149,6 +149,13 @@ gfx::Point CrossProcessFrameConnector::TransformPointToRootCoordSpace(
return transformed_point;
}
+void CrossProcessFrameConnector::ForwardProcessAckedTouchEvent(
+ const TouchEventWithLatencyInfo& touch,
+ InputEventAckState ack_result) {
+ if (auto main_view = GetRootRenderWidgetHostView())
+ main_view->ProcessAckedTouchEvent(touch, ack_result);
+}
+
bool CrossProcessFrameConnector::HasFocus() {
RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView();
if (root_view)
@@ -156,6 +163,12 @@ bool CrossProcessFrameConnector::HasFocus() {
return false;
}
+void CrossProcessFrameConnector::Focus() {
+ RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView();
+ if (root_view)
+ root_view->Focus();
+}
+
void CrossProcessFrameConnector::OnForwardInputEvent(
const blink::WebInputEvent* event) {
if (!view_)
@@ -168,6 +181,11 @@ void CrossProcessFrameConnector::OnForwardInputEvent(
? manager->GetOuterRenderWidgetHostForKeyboardInput()
: frame_proxy_in_parent_renderer_->GetRenderViewHost()->GetWidget();
+ // TODO(wjmaclean): Keyboard events will likely live here for a while, since
+ // they rely on focus and not on event coordinates, but we should get rid of
+ // the others since they are directly target using
+ // RenderWidgetHostInputEventRouter. But neither pathway is currently handling
+ // gesture events :-(
kenrb 2016/02/25 00:58:04 We don't need this to handle keyboard events, eith
wjmaclean 2016/02/25 12:23:02 Done.
if (blink::WebInputEvent::isKeyboardEventType(event->type)) {
if (!parent_widget->GetLastKeyboardEvent())
return;
@@ -177,6 +195,12 @@ void CrossProcessFrameConnector::OnForwardInputEvent(
return;
}
+ if (blink::WebInputEvent::isTouchEventType(event->type)) {
+ view_->ProcessTouchEvent(*static_cast<const blink::WebTouchEvent*>(event),
kenrb 2016/02/25 00:58:04 Is this needed? I think the entire method (OnForwa
wjmaclean 2016/02/25 12:23:02 I added this mostly for completeness, but I'm will
+ ui::LatencyInfo());
+ return;
+ }
+
if (blink::WebInputEvent::isMouseEventType(event->type)) {
view_->ProcessMouseEvent(*static_cast<const blink::WebMouseEvent*>(event));
return;

Powered by Google App Engine
This is Rietveld 408576698