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

Side by Side Diff: ui/events/gestures/motion_event_aura.cc

Issue 2860793003: Pass through tilt_x and tilt_y to blink (Closed)
Patch Set: Pass through tilt_x and tilt_y to blink Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/events/gestures/motion_event_aura.h" 5 #include "ui/events/gestures/motion_event_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/events/gesture_detection/gesture_configuration.h" 8 #include "ui/events/gesture_detection/gesture_configuration.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 19 matching lines...) Expand all
30 30
31 PointerProperties GetPointerPropertiesFromTouchEvent(const TouchEvent& touch) { 31 PointerProperties GetPointerPropertiesFromTouchEvent(const TouchEvent& touch) {
32 PointerProperties pointer_properties; 32 PointerProperties pointer_properties;
33 pointer_properties.x = touch.x(); 33 pointer_properties.x = touch.x();
34 pointer_properties.y = touch.y(); 34 pointer_properties.y = touch.y();
35 pointer_properties.raw_x = touch.root_location_f().x(); 35 pointer_properties.raw_x = touch.root_location_f().x();
36 pointer_properties.raw_y = touch.root_location_f().y(); 36 pointer_properties.raw_y = touch.root_location_f().y();
37 pointer_properties.id = touch.pointer_details().id; 37 pointer_properties.id = touch.pointer_details().id;
38 pointer_properties.pressure = touch.pointer_details().force; 38 pointer_properties.pressure = touch.pointer_details().force;
39 pointer_properties.source_device_id = touch.source_device_id(); 39 pointer_properties.source_device_id = touch.source_device_id();
40 pointer_properties.tilt_x = touch.pointer_details().tilt_x;
41 pointer_properties.tilt_y = touch.pointer_details().tilt_y;
40 42
41 pointer_properties.SetAxesAndOrientation(touch.pointer_details().radius_x, 43 pointer_properties.SetAxesAndOrientation(touch.pointer_details().radius_x,
42 touch.pointer_details().radius_y, 44 touch.pointer_details().radius_y,
43 touch.rotation_angle()); 45 touch.rotation_angle());
44 if (!pointer_properties.touch_major) { 46 if (!pointer_properties.touch_major) {
45 pointer_properties.touch_major = 47 pointer_properties.touch_major =
46 2.f * GestureConfiguration::GetInstance()->default_radius(); 48 2.f * GestureConfiguration::GetInstance()->default_radius();
47 pointer_properties.touch_minor = 49 pointer_properties.touch_minor =
48 2.f * GestureConfiguration::GetInstance()->default_radius(); 50 2.f * GestureConfiguration::GetInstance()->default_radius();
49 pointer_properties.orientation = 0; 51 pointer_properties.orientation = 0;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 173
172 int MotionEventAura::GetIndexFromId(int id) const { 174 int MotionEventAura::GetIndexFromId(int id) const {
173 int index = FindPointerIndexOfId(id); 175 int index = FindPointerIndexOfId(id);
174 // TODO(tdresser): remove these checks once crbug.com/525189 is fixed. 176 // TODO(tdresser): remove these checks once crbug.com/525189 is fixed.
175 CHECK_GE(index, 0); 177 CHECK_GE(index, 0);
176 CHECK_LT(index, static_cast<int>(GetPointerCount())); 178 CHECK_LT(index, static_cast<int>(GetPointerCount()));
177 return index; 179 return index;
178 } 180 }
179 181
180 } // namespace ui 182 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/motion_event_generic.cc ('k') | ui/events/test/motion_event_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698