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

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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Fix mouse up event sender not modifying modifiers Created 4 years 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/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index d945bb9ae56051c7297d9717a57c7f6e684ba651..f983d87334c5c4b0aed983adcb416206955920b7 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -13,6 +13,7 @@
#include "base/trace_event/trace_event.h"
#include "content/browser/renderer_host/input/timeout_monitor.h"
#include "content/common/input/web_touch_event_traits.h"
+#include "ui/events/base_event_utils.h"
#include "ui/gfx/geometry/point_f.h"
using blink::WebInputEvent;
@@ -504,10 +505,9 @@ void TouchEventQueue::PrependTouchScrollNotification() {
// non-empty queue to keep those tests as-is w/o exposing internals of this
// class all the way up.
if (!touch_queue_.empty()) {
- TouchEventWithLatencyInfo touch;
- touch.event.type = WebInputEvent::TouchScrollStarted;
- touch.event.uniqueTouchEventId = 0;
- touch.event.touchesLength = 0;
+ TouchEventWithLatencyInfo touch(
+ WebInputEvent::TouchScrollStarted, WebInputEvent::NoModifiers,
+ ui::EventTimeStampToSeconds(base::TimeTicks::Now()), LatencyInfo());
majidvp 2016/12/19 20:09:52 nit: s/base::TimeTicks::Now()/ui::EventTimeForNow(
dtapuska 2016/12/20 19:49:21 Done.
touch.event.dispatchType = WebInputEvent::EventNonBlocking;
auto it = touch_queue_.begin();

Powered by Google App Engine
This is Rietveld 408576698