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