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

Unified Diff: content/browser/renderer_host/input/motion_event_android.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_android.cc
diff --git a/content/browser/renderer_host/input/motion_event_android.cc b/content/browser/renderer_host/input/motion_event_android.cc
index 5a437f4e4694a5f4f3c52527de2e2f91de20627c..8d36c812cc0084dc9ba3d5cb2d9fa0459ff23832 100644
--- a/content/browser/renderer_host/input/motion_event_android.cc
+++ b/content/browser/renderer_host/input/motion_event_android.cc
@@ -10,6 +10,7 @@
#include "base/android/jni_android.h"
#include "jni/MotionEvent_jni.h"
+#include "ui/events/base_event_utils.h"
#include "ui/events/event_constants.h"
using base::android::AttachCurrentThread;
@@ -165,7 +166,8 @@ MotionEventAndroid::MotionEventAndroid(float pix_to_dip,
cached_button_state_(FromAndroidButtonState(android_button_state)),
cached_flags_(FromAndroidMetaState(meta_state)),
cached_raw_position_offset_(ToDips(raw_offset_x_pixels),
- ToDips(raw_offset_y_pixels)) {
+ ToDips(raw_offset_y_pixels)),
+ unique_event_id_(ui::GetNextTouchEventId()) {
DCHECK_GT(pointer_count, 0);
event_.Reset(env, event);
@@ -179,8 +181,8 @@ MotionEventAndroid::MotionEventAndroid(float pix_to_dip,
MotionEventAndroid::~MotionEventAndroid() {
}
-int MotionEventAndroid::GetId() const {
- return 0;
+uint32 MotionEventAndroid::GetUniqueEventId() const {
+ return unique_event_id_;
}
MotionEventAndroid::Action MotionEventAndroid::GetAction() const {
« no previous file with comments | « content/browser/renderer_host/input/motion_event_android.h ('k') | content/browser/renderer_host/input/motion_event_web.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698