Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: content/common/input/web_input_event_traits.cc

Issue 999423003: Set the unique_event_id when converting from TouchEvent to WebTouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/logging.h" 10 #include "base/logging.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 point.position.x, 101 point.position.x,
102 point.position.y, 102 point.position.y,
103 point.radiusX, 103 point.radiusX,
104 point.radiusY, 104 point.radiusY,
105 point.rotationAngle, 105 point.rotationAngle,
106 point.force); 106 point.force);
107 } 107 }
108 108
109 void ApppendEventDetails(const WebTouchEvent& event, std::string* result) { 109 void ApppendEventDetails(const WebTouchEvent& event, std::string* result) {
110 StringAppendF(result, 110 StringAppendF(result,
111 "{\n Touches: %u, Cancelable: %d, CausesScrolling: %d\n[\n", 111 "{\n Touches: %u, Cancelable: %d, CausesScrolling: %d,"
112 " uniqueTouchEventId: %u\n[\n",
112 event.touchesLength, 113 event.touchesLength,
113 event.cancelable, 114 event.cancelable,
114 event.causesScrollingIfUncanceled); 115 event.causesScrollingIfUncanceled,
116 static_cast<uint32_t>(event.uniqueTouchEventId));
jdduke (slow) 2015/04/17 20:30:01 I think we have some 64-bit printf-style helpers f
lanwei 2015/04/20 19:58:59 I found "PRIu64", is this the one you have seen be
115 for (unsigned i = 0; i < event.touchesLength; ++i) 117 for (unsigned i = 0; i < event.touchesLength; ++i)
116 ApppendTouchPointDetails(event.touches[i], result); 118 ApppendTouchPointDetails(event.touches[i], result);
117 result->append(" ]\n}"); 119 result->append(" ]\n}");
118 } 120 }
119 121
120 bool CanCoalesce(const WebKeyboardEvent& event_to_coalesce, 122 bool CanCoalesce(const WebKeyboardEvent& event_to_coalesce,
121 const WebKeyboardEvent& event) { 123 const WebKeyboardEvent& event) {
122 return false; 124 return false;
123 } 125 }
124 126
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 case WebInputEvent::TouchStart: 483 case WebInputEvent::TouchStart:
482 case WebInputEvent::TouchMove: 484 case WebInputEvent::TouchMove:
483 case WebInputEvent::TouchEnd: 485 case WebInputEvent::TouchEnd:
484 return !static_cast<const WebTouchEvent&>(event).cancelable; 486 return !static_cast<const WebTouchEvent&>(event).cancelable;
485 default: 487 default:
486 return false; 488 return false;
487 } 489 }
488 } 490 }
489 491
490 } // namespace content 492 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698