Index: content/browser/renderer_host/render_widget_host_impl.cc |
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
index 04f254f6ed6a4536505759b046e0d7a43d5f24c9..dd8929a567fa691dcad5c82fa65904067d0e23dd 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.cc |
+++ b/content/browser/renderer_host/render_widget_host_impl.cc |
@@ -1179,6 +1179,19 @@ void RenderWidgetHostImpl::QueueSyntheticGesture( |
} |
} |
+void RenderWidgetHostImpl::QueueSyntheticGesture( |
+ const SyntheticGestureParams& gesture_params, |
+ const base::Callback<void(SyntheticGesture::Result)>& on_complete) { |
+ if (!synthetic_gesture_controller_ && view_) { |
+ synthetic_gesture_controller_.reset( |
+ new SyntheticGestureController(view_->CreateSyntheticGestureTarget())); |
+ } |
+ if (synthetic_gesture_controller_) { |
+ synthetic_gesture_controller_->QueueSyntheticPointerAction(gesture_params, |
+ on_complete); |
+ } |
+} |
+ |
void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { |
if (!view_) |
return; |
@@ -1730,9 +1743,9 @@ void RenderWidgetHostImpl::OnQueueSyntheticGesture( |
} |
QueueSyntheticGesture( |
- SyntheticGesture::Create(*gesture_packet.gesture_params()), |
- base::Bind(&RenderWidgetHostImpl::OnSyntheticGestureCompleted, |
- weak_factory_.GetWeakPtr())); |
+ *gesture_packet.gesture_params(), |
+ base::Bind(&RenderWidgetHostImpl::OnSyntheticGestureCompleted, |
+ weak_factory_.GetWeakPtr())); |
} |
void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) { |
@@ -2005,9 +2018,21 @@ void RenderWidgetHostImpl::OnUnexpectedEventAck(UnexpectedEventAckType type) { |
void RenderWidgetHostImpl::OnSyntheticGestureCompleted( |
SyntheticGesture::Result result) { |
+ LOG(ERROR) << "RenderWidgetHostImpl::OnSyntheticGestureCompleted " |
+ << (int)result; |
Send(new InputMsg_SyntheticGestureCompleted(GetRoutingID())); |
} |
+// void RenderWidgetHostImpl::OnSyntheticPointerActionCompleted( |
+// SyntheticGesture::Result result) { |
+// if (result == SyntheticGesture::GESTURE_FINISHED) { |
+// if (synthetic_gesture_controller_) |
+// synthetic_gesture_controller_->ResetSyntheticPointer(); |
+ |
+// Send(new InputMsg_SyntheticGestureCompleted(GetRoutingID())); |
+// } |
+// } |
+ |
bool RenderWidgetHostImpl::ShouldDropInputEvents() const { |
return ignore_input_events_ || process_->IgnoreInputEvents() || !delegate_; |
} |