| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/input/touch_event_queue.h" | 5 #include "content/browser/renderer_host/input/touch_event_queue.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // Compare all properties of touch points to determine the state. | 50 // Compare all properties of touch points to determine the state. |
| 51 bool HasPointChanged(const WebTouchPoint& point_1, | 51 bool HasPointChanged(const WebTouchPoint& point_1, |
| 52 const WebTouchPoint& point_2) { | 52 const WebTouchPoint& point_2) { |
| 53 DCHECK_EQ(point_1.id, point_2.id); | 53 DCHECK_EQ(point_1.id, point_2.id); |
| 54 if (point_1.screenPosition != point_2.screenPosition || | 54 if (point_1.screenPosition != point_2.screenPosition || |
| 55 point_1.position != point_2.position || | 55 point_1.position != point_2.position || |
| 56 point_1.radiusX != point_2.radiusX || | 56 point_1.radiusX != point_2.radiusX || |
| 57 point_1.radiusY != point_2.radiusY || | 57 point_1.radiusY != point_2.radiusY || |
| 58 point_1.rotationAngle != point_2.rotationAngle || | 58 point_1.rotationAngle != point_2.rotationAngle || |
| 59 point_1.force != point_2.force) { | 59 point_1.force != point_2.force || |
| 60 point_1.tiltX != point_2.tiltX || |
| 61 point_1.tiltY != point_2.tiltY) { |
| 60 return true; | 62 return true; |
| 61 } | 63 } |
| 62 return false; | 64 return false; |
| 63 } | 65 } |
| 64 | 66 |
| 65 } // namespace | 67 } // namespace |
| 66 | 68 |
| 67 | 69 |
| 68 // Cancels a touch sequence if a touchstart or touchmove ack response is | 70 // Cancels a touch sequence if a touchstart or touchmove ack response is |
| 69 // sufficiently delayed. | 71 // sufficiently delayed. |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) | 874 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) |
| 873 send_touch_events_async_ = false; | 875 send_touch_events_async_ = false; |
| 874 has_handler_for_current_sequence_ |= | 876 has_handler_for_current_sequence_ |= |
| 875 ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; | 877 ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; |
| 876 } else if (WebTouchEventTraits::IsTouchSequenceEnd(event)) { | 878 } else if (WebTouchEventTraits::IsTouchSequenceEnd(event)) { |
| 877 has_handler_for_current_sequence_ = false; | 879 has_handler_for_current_sequence_ = false; |
| 878 } | 880 } |
| 879 } | 881 } |
| 880 | 882 |
| 881 } // namespace content | 883 } // namespace content |
| OLD | NEW |