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

Unified Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 290473006: Add a TouchEventStreamValidator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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/renderer_host/input/input_router_impl.cc
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 8869ee18451ebdee6d9eac956eeb2f91438def0a..a509465a65300c9bad0cb21b5614d27d61c9590f 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -174,7 +174,8 @@ void InputRouterImpl::SendKeyboardEvent(const NativeWebKeyboardEvent& key_event,
void InputRouterImpl::SendGestureEvent(
const GestureEventWithLatencyInfo& original_gesture_event) {
- event_stream_validator_.OnEvent(original_gesture_event.event);
+ input_stream_validator_.Validate(original_gesture_event.event);
+
GestureEventWithLatencyInfo gesture_event(original_gesture_event);
if (touch_action_filter_.FilterGestureEvent(&gesture_event.event))
@@ -191,6 +192,7 @@ void InputRouterImpl::SendGestureEvent(
void InputRouterImpl::SendTouchEvent(
const TouchEventWithLatencyInfo& touch_event) {
+ input_stream_validator_.Validate(touch_event.event);
touch_event_queue_.QueueEvent(touch_event);
}
@@ -340,6 +342,8 @@ void InputRouterImpl::FilterAndSendWebInputEvent(
void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event,
const ui::LatencyInfo& latency_info,
bool is_keyboard_shortcut) {
+ output_stream_validator_.Validate(input_event);
+
if (OfferToClient(input_event, latency_info))
return;

Powered by Google App Engine
This is Rietveld 408576698