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

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

Issue 999423003: Set the unique_event_id when converting from TouchEvent to WebTouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/motion_event_web.cc
diff --git a/content/browser/renderer_host/input/motion_event_web.cc b/content/browser/renderer_host/input/motion_event_web.cc
index 2d276f0371ea23757ad508f23df1cdb496d015ed..ece1146e69f2c870843001b19715a15ab6b7eb70 100644
--- a/content/browser/renderer_host/input/motion_event_web.cc
+++ b/content/browser/renderer_host/input/motion_event_web.cc
@@ -12,6 +12,7 @@
#include "base/logging.h"
#include "content/browser/renderer_host/input/web_input_event_util.h"
#include "content/common/input/web_touch_event_traits.h"
+#include "ui/events/base_event_utils.h"
using blink::WebInputEvent;
using blink::WebTouchEvent;
@@ -63,7 +64,8 @@ int GetActionIndexFrom(const WebTouchEvent& event) {
MotionEventWeb::MotionEventWeb(const WebTouchEvent& event)
: event_(event),
cached_action_(GetActionFrom(event)),
- cached_action_index_(GetActionIndexFrom(event)) {
+ cached_action_index_(GetActionIndexFrom(event)),
+ unique_event_id_(ui::GetNextTouchEventId()) {
DCHECK_GT(GetPointerCount(), 0U);
}
@@ -73,6 +75,10 @@ int MotionEventWeb::GetId() const {
return 0;
}
+uint64 MotionEventWeb::GetUniqueEventId() const {
+ return unique_event_id_;
tdresser 2015/04/09 12:33:06 Did you figure out why there were no test failures
lanwei 2015/04/16 17:09:06 The unit test does not use this type, it uses WebT
+}
+
MotionEventWeb::Action MotionEventWeb::GetAction() const {
return cached_action_;
}

Powered by Google App Engine
This is Rietveld 408576698