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

Unified Diff: ui/events/event.h

Issue 785753002: Don't refcount tracking id -> slot id mapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix uninitialized memory issue. Created 6 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: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index 427a731c0a203a44500cdbf1eadb34c60be0feb3..d1fbab5c5d06d499e276f03f4ab2050c145b7c2e 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -224,9 +224,6 @@ class EVENTS_EXPORT Event {
Event(const base::NativeEvent& native_event, EventType type, int flags);
Event(const Event& copy);
void SetType(EventType type);
- void set_delete_native_event(bool delete_native_event) {
- delete_native_event_ = delete_native_event;
- }
void set_cancelable(bool cancelable) { cancelable_ = cancelable; }
void set_time_stamp(const base::TimeDelta& time_stamp) {
@@ -492,8 +489,8 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
radius_x_(model.radius_x_),
radius_y_(model.radius_y_),
rotation_angle_(model.rotation_angle_),
- force_(model.force_) {
- }
+ force_(model.force_),
+ should_remove_native_touch_id_mapping_(false) {}
TouchEvent(EventType type,
const gfx::PointF& location,
@@ -522,6 +519,12 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
void set_radius_x(const float r) { radius_x_ = r; }
void set_radius_y(const float r) { radius_y_ = r; }
+ void set_should_remove_native_touch_id_mapping(
+ bool should_remove_native_touch_id_mapping) {
+ should_remove_native_touch_id_mapping_ =
+ should_remove_native_touch_id_mapping;
+ }
+
// Overridden from LocatedEvent.
void UpdateForRootTransform(
const gfx::Transform& inverted_root_transform) override;
@@ -554,6 +557,13 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
// Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0.
float force_;
+
+ // True if this event should remove the mapping between the native
+ // event id and the chromium touch id. This should only be the case
+ // for release and cancel events where the associated touch press
+ // event created a mapping between the native id and the chromium
+ // touch id.
+ bool should_remove_native_touch_id_mapping_;
};
// An interface that individual platforms can use to store additional data on

Powered by Google App Engine
This is Rietveld 408576698