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

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

Issue 1112193002: Change the print format to be unsigned int (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add cast Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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 static_cast<uint32>(event.uniqueTouchEventId));
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698