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

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: Address sadrul's comments. 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
« no previous file with comments | « ui/events/devices/x11/touch_factory_x11.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index e32e77c6700ca50b35a6224b07774cd763be9661..28dbfff49702ee4027f507aaf5960b1db6b9b567 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;
@@ -544,7 +547,7 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
private:
// Adjusts rotation_angle_ to within the acceptable range.
- void fixRotationAngle();
+ void FixRotationAngle();
// The identity (typically finger) of the touch starting at 0 and incrementing
// for each separable additional touch that the hardware can detect.
@@ -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 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.
sadrul 2015/01/28 00:04:05 s/chromium touch id/|touch_id_|/
tdresser 2015/01/28 14:52:14 Done.
+ bool should_remove_native_touch_id_mapping_;
};
// An interface that individual platforms can use to store additional data on
« no previous file with comments | « ui/events/devices/x11/touch_factory_x11.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698