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 df99c91977c538699099a62f0ad60a85a9fb9597..16a0d09d3c78fda05812bc112e487cffeef7d41b 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.cc |
+++ b/content/browser/renderer_host/render_widget_host_impl.cc |
@@ -862,6 +862,11 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo( |
if (IgnoreInputEvents()) |
return; |
+ if (!intercepting_mouse_callback_.is_null()) { |
jdduke (slow)
2014/08/15 16:49:48
Can you not use the existing AddMouseEventCallback
pfeldman
2014/08/15 19:32:33
I can. Was not expecting things to be so simple. T
|
+ intercepting_mouse_callback_.Run(mouse_event); |
+ return; |
+ } |
+ |
if (touch_emulator_ && touch_emulator_->HandleMouseEvent(mouse_event)) |
return; |
@@ -1623,6 +1628,11 @@ void RenderWidgetHostImpl::SetTouchEventEmulationEnabled( |
} |
} |
+void RenderWidgetHostImpl::SetInterceptingMouseCallback( |
+ const InterceptingMouseCallback& callback) { |
+ intercepting_mouse_callback_ = callback; |
+} |
+ |
void RenderWidgetHostImpl::OnTextInputStateChanged( |
const ViewHostMsg_TextInputState_Params& params) { |
if (view_) |