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

Side by Side Diff: ui/events/blink/web_input_event.cc

Issue 2289273002: Eraser tool type plumbing from ui/events to web events and PPAPI. (Closed)
Patch Set: The CQ works! We were stripping the SHIFT mod from NaCL events. Fixed. Created 4 years, 3 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 | « ui/events/blink/blink_event_util.cc ('k') | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/blink/web_input_event.h" 5 #include "ui/events/blink/web_input_event.h"
6 6
7 #include "ui/events/base_event_utils.h" 7 #include "ui/events/base_event_utils.h"
8 #include "ui/events/blink/blink_event_util.h" 8 #include "ui/events/blink/blink_event_util.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/event_utils.h" 10 #include "ui/events/event_utils.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 blink::WebPointerProperties::PointerType EventPointerTypeToWebPointerType( 31 blink::WebPointerProperties::PointerType EventPointerTypeToWebPointerType(
32 EventPointerType pointer_type) { 32 EventPointerType pointer_type) {
33 switch (pointer_type) { 33 switch (pointer_type) {
34 case EventPointerType::POINTER_TYPE_UNKNOWN: 34 case EventPointerType::POINTER_TYPE_UNKNOWN:
35 return blink::WebPointerProperties::PointerType::Unknown; 35 return blink::WebPointerProperties::PointerType::Unknown;
36 case EventPointerType::POINTER_TYPE_MOUSE: 36 case EventPointerType::POINTER_TYPE_MOUSE:
37 return blink::WebPointerProperties::PointerType::Mouse; 37 return blink::WebPointerProperties::PointerType::Mouse;
38 case EventPointerType::POINTER_TYPE_PEN: 38 case EventPointerType::POINTER_TYPE_PEN:
39 return blink::WebPointerProperties::PointerType::Pen;
39 case EventPointerType::POINTER_TYPE_ERASER: 40 case EventPointerType::POINTER_TYPE_ERASER:
40 return blink::WebPointerProperties::PointerType::Pen; 41 return blink::WebPointerProperties::PointerType::Eraser;
41 case EventPointerType::POINTER_TYPE_TOUCH: 42 case EventPointerType::POINTER_TYPE_TOUCH:
42 return blink::WebPointerProperties::PointerType::Touch; 43 return blink::WebPointerProperties::PointerType::Touch;
43 } 44 }
44 NOTREACHED() << "Unexpected EventPointerType"; 45 NOTREACHED() << "Unexpected EventPointerType";
45 return blink::WebPointerProperties::PointerType::Unknown; 46 return blink::WebPointerProperties::PointerType::Unknown;
46 } 47 }
47 48
48 // Creates a WebGestureEvent from a GestureEvent. Note that it does not 49 // Creates a WebGestureEvent from a GestureEvent. Note that it does not
49 // populate the event coordinates (i.e. |x|, |y|, |globalX|, and |globalY|). So 50 // populate the event coordinates (i.e. |x|, |y|, |globalX|, and |globalY|). So
50 // the caller must populate these fields. 51 // the caller must populate these fields.
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 webkit_event.tiltX = roundf(event.pointer_details().tilt_x); 451 webkit_event.tiltX = roundf(event.pointer_details().tilt_x);
451 webkit_event.tiltY = roundf(event.pointer_details().tilt_y); 452 webkit_event.tiltY = roundf(event.pointer_details().tilt_y);
452 webkit_event.force = event.pointer_details().force; 453 webkit_event.force = event.pointer_details().force;
453 webkit_event.pointerType = 454 webkit_event.pointerType =
454 EventPointerTypeToWebPointerType(event.pointer_details().pointer_type); 455 EventPointerTypeToWebPointerType(event.pointer_details().pointer_type);
455 456
456 return webkit_event; 457 return webkit_event;
457 } 458 }
458 459
459 } // namespace ui 460 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698