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/common/input/web_input_event_traits.h" | 5 #include "content/common/input/web_input_event_traits.h" |
6 | 6 |
7 #include <bitset> | 7 #include <bitset> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
| 10 #include "base/format_macros.h" |
10 #include "base/logging.h" | 11 #include "base/logging.h" |
11 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
12 | 13 |
13 using base::StringAppendF; | 14 using base::StringAppendF; |
14 using base::SStringPrintf; | 15 using base::SStringPrintf; |
15 using blink::WebGestureEvent; | 16 using blink::WebGestureEvent; |
16 using blink::WebInputEvent; | 17 using blink::WebInputEvent; |
17 using blink::WebKeyboardEvent; | 18 using blink::WebKeyboardEvent; |
18 using blink::WebMouseEvent; | 19 using blink::WebMouseEvent; |
19 using blink::WebMouseWheelEvent; | 20 using blink::WebMouseWheelEvent; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 point.position.x, | 102 point.position.x, |
102 point.position.y, | 103 point.position.y, |
103 point.radiusX, | 104 point.radiusX, |
104 point.radiusY, | 105 point.radiusY, |
105 point.rotationAngle, | 106 point.rotationAngle, |
106 point.force); | 107 point.force); |
107 } | 108 } |
108 | 109 |
109 void ApppendEventDetails(const WebTouchEvent& event, std::string* result) { | 110 void ApppendEventDetails(const WebTouchEvent& event, std::string* result) { |
110 StringAppendF(result, | 111 StringAppendF(result, |
111 "{\n Touches: %u, Cancelable: %d, CausesScrolling: %d\n[\n", | 112 "{\n Touches: %u, Cancelable: %d, CausesScrolling: %d," |
| 113 " uniqueTouchEventId: %" PRIu64 "\n[\n", |
112 event.touchesLength, | 114 event.touchesLength, |
113 event.cancelable, | 115 event.cancelable, |
114 event.causesScrollingIfUncanceled); | 116 event.causesScrollingIfUncanceled, |
| 117 event.uniqueTouchEventId); |
115 for (unsigned i = 0; i < event.touchesLength; ++i) | 118 for (unsigned i = 0; i < event.touchesLength; ++i) |
116 ApppendTouchPointDetails(event.touches[i], result); | 119 ApppendTouchPointDetails(event.touches[i], result); |
117 result->append(" ]\n}"); | 120 result->append(" ]\n}"); |
118 } | 121 } |
119 | 122 |
120 bool CanCoalesce(const WebKeyboardEvent& event_to_coalesce, | 123 bool CanCoalesce(const WebKeyboardEvent& event_to_coalesce, |
121 const WebKeyboardEvent& event) { | 124 const WebKeyboardEvent& event) { |
122 return false; | 125 return false; |
123 } | 126 } |
124 | 127 |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 case WebInputEvent::TouchStart: | 484 case WebInputEvent::TouchStart: |
482 case WebInputEvent::TouchMove: | 485 case WebInputEvent::TouchMove: |
483 case WebInputEvent::TouchEnd: | 486 case WebInputEvent::TouchEnd: |
484 return !static_cast<const WebTouchEvent&>(event).cancelable; | 487 return !static_cast<const WebTouchEvent&>(event).cancelable; |
485 default: | 488 default: |
486 return false; | 489 return false; |
487 } | 490 } |
488 } | 491 } |
489 | 492 |
490 } // namespace content | 493 } // namespace content |
OLD | NEW |