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

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

Issue 2227803003: Plumb phase/momentum for WheelEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Non-Mac compile. Created 4 years, 4 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 9
10 using base::StringAppendF; 10 using base::StringAppendF;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 event.movementX, 45 event.movementX,
46 event.movementY, 46 event.movementY,
47 event.clickCount); 47 event.clickCount);
48 } 48 }
49 49
50 void ApppendEventDetails(const WebMouseWheelEvent& event, std::string* result) { 50 void ApppendEventDetails(const WebMouseWheelEvent& event, std::string* result) {
51 StringAppendF( 51 StringAppendF(
52 result, 52 result,
53 "{\n Delta: (%f, %f)\n WheelTicks: (%f, %f)\n Accel: (%f, %f)\n" 53 "{\n Delta: (%f, %f)\n WheelTicks: (%f, %f)\n Accel: (%f, %f)\n"
54 " ScrollByPage: %d\n HasPreciseScrollingDeltas: %d\n" 54 " ScrollByPage: %d\n HasPreciseScrollingDeltas: %d\n"
55 " Phase: (%d, %d)\n CanRubberband: (%d, %d)\n}", 55 " Phase: (%d, %d)",
56 event.deltaX, event.deltaY, event.wheelTicksX, event.wheelTicksY, 56 event.deltaX, event.deltaY, event.wheelTicksX, event.wheelTicksY,
57 event.accelerationRatioX, event.accelerationRatioY, event.scrollByPage, 57 event.accelerationRatioX, event.accelerationRatioY, event.scrollByPage,
58 event.hasPreciseScrollingDeltas, event.phase, event.momentumPhase, 58 event.hasPreciseScrollingDeltas, event.phase, event.momentumPhase);
59 event.canRubberbandLeft, event.canRubberbandRight);
60 } 59 }
61 60
62 void ApppendEventDetails(const WebGestureEvent& event, std::string* result) { 61 void ApppendEventDetails(const WebGestureEvent& event, std::string* result) {
63 StringAppendF(result, 62 StringAppendF(result,
64 "{\n Pos: (%d, %d)\n GlobalPos: (%d, %d)\n SourceDevice: %d\n" 63 "{\n Pos: (%d, %d)\n GlobalPos: (%d, %d)\n SourceDevice: %d\n"
65 " RawData: (%f, %f, %f, %f, %d)\n}", 64 " RawData: (%f, %f, %f, %f, %d)\n}",
66 event.x, 65 event.x,
67 event.y, 66 event.y,
68 event.globalX, 67 event.globalX,
69 event.globalY, 68 event.globalY,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 295
297 uint32_t WebInputEventTraits::GetUniqueTouchEventId( 296 uint32_t WebInputEventTraits::GetUniqueTouchEventId(
298 const WebInputEvent& event) { 297 const WebInputEvent& event) {
299 if (WebInputEvent::isTouchEventType(event.type)) { 298 if (WebInputEvent::isTouchEventType(event.type)) {
300 return static_cast<const WebTouchEvent&>(event).uniqueTouchEventId; 299 return static_cast<const WebTouchEvent&>(event).uniqueTouchEventId;
301 } 300 }
302 return 0U; 301 return 0U;
303 } 302 }
304 303
305 } // namespace content 304 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698