Index: ui/events/blink/blink_event_util.h |
diff --git a/ui/events/blink/blink_event_util.h b/ui/events/blink/blink_event_util.h |
index aa12f9d1dd9132985e7ecf6aeab5964efb5205ae..247ce4f2e6675dd6d3a5dd0ce292246fc2c8eef2 100644 |
--- a/ui/events/blink/blink_event_util.h |
+++ b/ui/events/blink/blink_event_util.h |
@@ -22,6 +22,7 @@ class WebTouchEvent; |
namespace gfx { |
class PointF; |
+class Vector2d; |
} |
namespace ui { |
@@ -51,6 +52,16 @@ std::unique_ptr<blink::WebInputEvent> ScaleWebInputEvent( |
const blink::WebInputEvent& event, |
float scale); |
+// Transforms coordinates and other properties of |event|, by |
+// 1) translating / shifting by |delta| and |
+// 2) scaling by |scale|. |
+// If |event| does not need to change, returns nullptr. |
+// Otherwise, returns the transformed version of |event|. |
+std::unique_ptr<blink::WebInputEvent> TranslateAndScaleWebInputEvent( |
+ const blink::WebInputEvent& event, |
+ const gfx::Vector2d& delta, |
+ float scale); |
+ |
blink::WebPointerProperties::PointerType ToWebPointerType( |
MotionEvent::ToolType tool_type); |