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

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

Issue 134123003: Generate proper LatencyInfo components for synthetic gestures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove InputEvent forward decl Created 6 years, 11 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/input/synthetic_smooth_scroll_gesture.cc ('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/input/synthetic_tap_gesture.cc
diff --git a/content/browser/renderer_host/input/synthetic_tap_gesture.cc b/content/browser/renderer_host/input/synthetic_tap_gesture.cc
index ea7e98419c4d56ab82579854ea1378b52b87654a..11a1afb5cb0206f61ba6225bbcafacadfcf4c669 100644
--- a/content/browser/renderer_host/input/synthetic_tap_gesture.cc
+++ b/content/browser/renderer_host/input/synthetic_tap_gesture.cc
@@ -5,20 +5,10 @@
#include "content/browser/renderer_host/input/synthetic_tap_gesture.h"
#include "base/logging.h"
-#include "content/common/input/input_event.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/latency_info.h"
namespace content {
-namespace {
-
-void DispatchEventToPlatform(SyntheticGestureTarget* target,
- const blink::WebInputEvent& event) {
- target->DispatchInputEventToPlatform(
- InputEvent(event, ui::LatencyInfo(), false));
-}
-
-} // namespace
SyntheticTapGesture::SyntheticTapGesture(
const SyntheticTapGestureParams& params)
@@ -86,7 +76,7 @@ void SyntheticTapGesture::Press(SyntheticGestureTarget* target,
if (gesture_source_type_ == SyntheticGestureParams::TOUCH_INPUT) {
touch_event_.PressPoint(params_.position.x(), params_.position.y());
touch_event_.timeStampSeconds = ConvertTimestampToSeconds(timestamp);
- DispatchEventToPlatform(target, touch_event_);
+ target->DispatchInputEventToPlatform(touch_event_);
} else if (gesture_source_type_ == SyntheticGestureParams::MOUSE_INPUT) {
blink::WebMouseEvent mouse_event =
SyntheticWebMouseEventBuilder::Build(blink::WebInputEvent::MouseDown,
@@ -95,7 +85,7 @@ void SyntheticTapGesture::Press(SyntheticGestureTarget* target,
0);
mouse_event.clickCount = 1;
mouse_event.timeStampSeconds = ConvertTimestampToSeconds(timestamp);
- DispatchEventToPlatform(target, mouse_event);
+ target->DispatchInputEventToPlatform(mouse_event);
} else {
NOTREACHED() << "Invalid gesture source type for synthetic tap gesture.";
}
@@ -106,7 +96,7 @@ void SyntheticTapGesture::Release(SyntheticGestureTarget* target,
if (gesture_source_type_ == SyntheticGestureParams::TOUCH_INPUT) {
touch_event_.ReleasePoint(0);
touch_event_.timeStampSeconds = ConvertTimestampToSeconds(timestamp);
- DispatchEventToPlatform(target, touch_event_);
+ target->DispatchInputEventToPlatform(touch_event_);
} else if (gesture_source_type_ == SyntheticGestureParams::MOUSE_INPUT) {
blink::WebMouseEvent mouse_event =
SyntheticWebMouseEventBuilder::Build(blink::WebInputEvent::MouseUp,
@@ -115,7 +105,7 @@ void SyntheticTapGesture::Release(SyntheticGestureTarget* target,
0);
mouse_event.clickCount = 1;
mouse_event.timeStampSeconds = ConvertTimestampToSeconds(timestamp);
- DispatchEventToPlatform(target, mouse_event);
+ target->DispatchInputEventToPlatform(mouse_event);
} else {
NOTREACHED() << "Invalid gesture source type for synthetic tap gesture.";
}
« no previous file with comments | « content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698