| 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/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "content/browser/renderer_host/input/timeout_monitor.h" | 10 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Compare all properties of touch points to determine the state. | 49 // Compare all properties of touch points to determine the state. |
| 50 bool HasPointChanged(const WebTouchPoint& point_1, | 50 bool HasPointChanged(const WebTouchPoint& point_1, |
| 51 const WebTouchPoint& point_2) { | 51 const WebTouchPoint& point_2) { |
| 52 DCHECK_EQ(point_1.id, point_2.id); | 52 DCHECK_EQ(point_1.id, point_2.id); |
| 53 if (point_1.screenPosition != point_2.screenPosition || | 53 if (point_1.screenPosition != point_2.screenPosition || |
| 54 point_1.position != point_2.position || | 54 point_1.position != point_2.position || |
| 55 point_1.radiusX != point_2.radiusX || | 55 point_1.radiusX != point_2.radiusX || |
| 56 point_1.radiusY != point_2.radiusY || | 56 point_1.radiusY != point_2.radiusY || |
| 57 point_1.rotationAngle != point_2.rotationAngle || | 57 point_1.rotationAngle != point_2.rotationAngle || |
| 58 point_1.force != point_2.force) { | 58 point_1.force != point_2.force || |
| 59 // TODO(e_hakkinen): Leave only either tilt and tiltOrientation, tiltRad |
| 60 // and tiltOrientationRad or tiltX and tiltY. |
| 61 point_1.tilt != point_2.tilt || |
| 62 point_1.tiltRad != point_2.tiltRad || |
| 63 point_1.tiltOrientation != point_2.tiltOrientation || |
| 64 point_1.tiltOrientationRad != point_2.tiltOrientationRad || |
| 65 point_1.tiltX != point_2.tiltX || |
| 66 point_1.tiltY != point_2.tiltY) { |
| 59 return true; | 67 return true; |
| 60 } | 68 } |
| 61 return false; | 69 return false; |
| 62 } | 70 } |
| 63 | 71 |
| 64 } // namespace | 72 } // namespace |
| 65 | 73 |
| 66 | 74 |
| 67 // Cancels a touch sequence if a touchstart or touchmove ack response is | 75 // Cancels a touch sequence if a touchstart or touchmove ack response is |
| 68 // sufficiently delayed. | 76 // sufficiently delayed. |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) | 806 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) |
| 799 send_touch_events_async_ = false; | 807 send_touch_events_async_ = false; |
| 800 has_handler_for_current_sequence_ |= | 808 has_handler_for_current_sequence_ |= |
| 801 ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; | 809 ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; |
| 802 } else if (WebTouchEventTraits::IsTouchSequenceEnd(event)) { | 810 } else if (WebTouchEventTraits::IsTouchSequenceEnd(event)) { |
| 803 has_handler_for_current_sequence_ = false; | 811 has_handler_for_current_sequence_ = false; |
| 804 } | 812 } |
| 805 } | 813 } |
| 806 | 814 |
| 807 } // namespace content | 815 } // namespace content |
| OLD | NEW |