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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 481483002: DevTools: backend part of the color picker (behind experiment). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_)
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698