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

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

Issue 755403006: Added experimental Touch.tilt, Touch.tiltDirection support for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused code (event_sender.cc) Created 5 years, 9 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 | « content/browser/renderer_host/ui_events_helper.cc ('k') | content/content.gyp » ('j') | 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/logging.h" 10 #include "base/logging.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 event.data.scrollUpdate.deltaX, 86 event.data.scrollUpdate.deltaX,
87 event.data.scrollUpdate.deltaY, 87 event.data.scrollUpdate.deltaY,
88 event.data.scrollUpdate.velocityX, 88 event.data.scrollUpdate.velocityX,
89 event.data.scrollUpdate.velocityY, 89 event.data.scrollUpdate.velocityY,
90 event.data.scrollUpdate.previousUpdateInSequencePrevented); 90 event.data.scrollUpdate.previousUpdateInSequencePrevented);
91 } 91 }
92 92
93 void ApppendTouchPointDetails(const WebTouchPoint& point, std::string* result) { 93 void ApppendTouchPointDetails(const WebTouchPoint& point, std::string* result) {
94 StringAppendF(result, 94 StringAppendF(result,
95 " (ID: %d, State: %d, ScreenPos: (%f, %f), Pos: (%f, %f)," 95 " (ID: %d, State: %d, ScreenPos: (%f, %f), Pos: (%f, %f),"
96 " Radius: (%f, %f), Rot: %f, Force: %f),\n", 96 " Radius: (%f, %f), Rot: %f, Tilt: %f, TiltDirection: %f,"
97 " Force: %f),\n",
97 point.id, 98 point.id,
98 point.state, 99 point.state,
99 point.screenPosition.x, 100 point.screenPosition.x,
100 point.screenPosition.y, 101 point.screenPosition.y,
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,
107 point.tilt,
108 point.tiltDirection,
106 point.force); 109 point.force);
107 } 110 }
108 111
109 void ApppendEventDetails(const WebTouchEvent& event, std::string* result) { 112 void ApppendEventDetails(const WebTouchEvent& event, std::string* result) {
110 StringAppendF(result, 113 StringAppendF(result,
111 "{\n Touches: %u, Cancelable: %d, CausesScrolling: %d\n[\n", 114 "{\n Touches: %u, Cancelable: %d, CausesScrolling: %d\n[\n",
112 event.touchesLength, 115 event.touchesLength,
113 event.cancelable, 116 event.cancelable,
114 event.causesScrollingIfUncanceled); 117 event.causesScrollingIfUncanceled);
115 for (unsigned i = 0; i < event.touchesLength; ++i) 118 for (unsigned i = 0; i < event.touchesLength; ++i)
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/ui_events_helper.cc ('k') | content/content.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698