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

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: Tidied things up. Created 5 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
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index e32e77c6700ca50b35a6224b07774cd763be9661..a0434a6fc3a70bd6f6a185ee8d3e4845d4522053 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -212,7 +212,7 @@ class EVENTS_EXPORT Event {
void StopPropagation();
bool stopped_propagation() const { return !!(result_ & ER_CONSUMED); }
-
+ // Marks the event as having been handled. A handled event does not reach the
// next event phase. For example, if an event is handled during the pre-target
// phase, then the event is dispatched to all pre-target handlers, but not to
// the target or post-target handlers.
@@ -225,9 +225,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) {
@@ -495,7 +492,7 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
radius_y_(model.radius_y_),
rotation_angle_(model.rotation_angle_),
force_(model.force_),
- may_cause_scrolling_(model.may_cause_scrolling_) {}
+ should_remove_native_touch_id_mapping_(false) {}
TouchEvent(EventType type,
const gfx::PointF& location,
@@ -532,6 +529,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;
@@ -570,6 +573,13 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
// touchmove that exceeds the platform slop region, or a touchend that
// causes a fling). Defaults to false.
bool may_cause_scrolling_;
+
+ // True if this event should remove the mapping between the native
+ // event id and the chromium touch id. This should only be the case
sadrul 2015/01/26 18:49:46 s/chromium touch id/touch_id_/
tdresser 2015/01/27 21:43:05 Done.
+ // 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