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

Side by Side Diff: content/browser/renderer_host/input/touch_emulator.cc

Issue 1187273004: Pass MotionEvent tilt angles to Blink on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 "content/browser/renderer_host/input/touch_emulator.h" 5 #include "content/browser/renderer_host/input/touch_emulator.h"
6 6
7 #include "content/browser/renderer_host/input/motion_event_web.h" 7 #include "content/browser/renderer_host/input/motion_event_web.h"
8 #include "content/browser/renderer_host/input/web_input_event_util.h" 8 #include "content/browser/renderer_host/input/web_input_event_util.h"
9 #include "content/common/input/web_touch_event_traits.h" 9 #include "content/common/input/web_touch_event_traits.h"
10 #include "content/grit/content_resources.h" 10 #include "content/grit/content_resources.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 WebTouchPoint& point = touch_event_.touches[0]; 440 WebTouchPoint& point = touch_event_.touches[0];
441 point.id = 0; 441 point.id = 0;
442 point.radiusX = 0.5f * cursor_size_.width(); 442 point.radiusX = 0.5f * cursor_size_.width();
443 point.radiusY = 0.5f * cursor_size_.height(); 443 point.radiusY = 0.5f * cursor_size_.height();
444 point.force = 1.f; 444 point.force = 1.f;
445 point.rotationAngle = 0.f; 445 point.rotationAngle = 0.f;
446 point.position.x = mouse_event.x; 446 point.position.x = mouse_event.x;
447 point.screenPosition.x = mouse_event.globalX; 447 point.screenPosition.x = mouse_event.globalX;
448 point.position.y = mouse_event.y; 448 point.position.y = mouse_event.y;
449 point.screenPosition.y = mouse_event.globalY; 449 point.screenPosition.y = mouse_event.globalY;
450 // TODO(e_hakkinen): Leave only either tilt and tiltOrientation, tiltRad
451 // and tiltOrientationRad or tiltX and tiltY.
452 point.tilt = 0.f;
453 point.tiltRad = 0.f;
454 point.tiltOrientation = 0.f;
455 point.tiltOrientationRad = 0.f;
456 point.tiltX = 0.f;
457 point.tiltY = 0.f;
450 } 458 }
451 459
452 bool TouchEmulator::InPinchGestureMode() const { 460 bool TouchEmulator::InPinchGestureMode() const {
453 return shift_pressed_; 461 return shift_pressed_;
454 } 462 }
455 463
456 } // namespace content 464 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698