| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/events/gestures/motion_event_aura.h" | 5 #include "ui/events/gestures/motion_event_aura.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/events/gesture_detection/gesture_configuration.h" | 8 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 UpdateTouch(touch); | 104 UpdateTouch(touch); |
| 105 break; | 105 break; |
| 106 default: | 106 default: |
| 107 NOTREACHED(); | 107 NOTREACHED(); |
| 108 return false; | 108 return false; |
| 109 } | 109 } |
| 110 | 110 |
| 111 UpdateCachedAction(touch); | 111 UpdateCachedAction(touch); |
| 112 set_unique_event_id(touch.unique_event_id()); | 112 set_unique_event_id(touch.unique_event_id()); |
| 113 set_flags(touch.flags()); | 113 set_flags(touch.flags()); |
| 114 set_event_time(touch.time_stamp() + base::TimeTicks()); | 114 set_event_time(touch.time_stamp()); |
| 115 return true; | 115 return true; |
| 116 } | 116 } |
| 117 | 117 |
| 118 void MotionEventAura::CleanupRemovedTouchPoints(const TouchEvent& event) { | 118 void MotionEventAura::CleanupRemovedTouchPoints(const TouchEvent& event) { |
| 119 if (event.type() != ET_TOUCH_RELEASED && | 119 if (event.type() != ET_TOUCH_RELEASED && |
| 120 event.type() != ET_TOUCH_CANCELLED) { | 120 event.type() != ET_TOUCH_CANCELLED) { |
| 121 return; | 121 return; |
| 122 } | 122 } |
| 123 | 123 |
| 124 DCHECK(GetPointerCount()); | 124 DCHECK(GetPointerCount()); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 int MotionEventAura::GetIndexFromId(int id) const { | 181 int MotionEventAura::GetIndexFromId(int id) const { |
| 182 int index = FindPointerIndexOfId(id); | 182 int index = FindPointerIndexOfId(id); |
| 183 // TODO(tdresser): remove these checks once crbug.com/525189 is fixed. | 183 // TODO(tdresser): remove these checks once crbug.com/525189 is fixed. |
| 184 CHECK_GE(index, 0); | 184 CHECK_GE(index, 0); |
| 185 CHECK_LT(index, static_cast<int>(GetPointerCount())); | 185 CHECK_LT(index, static_cast<int>(GetPointerCount())); |
| 186 return index; | 186 return index; |
| 187 } | 187 } |
| 188 | 188 |
| 189 } // namespace ui | 189 } // namespace ui |
| OLD | NEW |