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

Side by Side Diff: third_party/WebKit/Source/core/events/PointerEventFactory.cpp

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 | « ppapi/c/ppb_input_event.h ('k') | third_party/WebKit/public/platform/WebPointerProperties.h » ('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 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 "core/events/PointerEventFactory.h" 5 #include "core/events/PointerEventFactory.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "platform/geometry/FloatSize.h" 8 #include "platform/geometry/FloatSize.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 namespace { 12 namespace {
13 13
14 inline int toInt(WebPointerProperties::PointerType t) { return static_cast<int>( t); } 14 inline int toInt(WebPointerProperties::PointerType t) { return static_cast<int>( t); }
15 15
16 const char* pointerTypeNameForWebPointPointerType(WebPointerProperties::PointerT ype type) 16 const char* pointerTypeNameForWebPointPointerType(WebPointerProperties::PointerT ype type)
17 { 17 {
18 switch (type) { 18 switch (type) {
19 case WebPointerProperties::PointerType::Unknown: 19 case WebPointerProperties::PointerType::Unknown:
20 return ""; 20 return "";
21 case WebPointerProperties::PointerType::Touch: 21 case WebPointerProperties::PointerType::Touch:
22 return "touch"; 22 return "touch";
23 case WebPointerProperties::PointerType::Pen: 23 case WebPointerProperties::PointerType::Pen:
24 case WebPointerProperties::PointerType::Eraser:
25 // TODO(mustaq): Continue eraser plumbing to web API.
26 // See crbug.com/642455
24 return "pen"; 27 return "pen";
25 case WebPointerProperties::PointerType::Mouse: 28 case WebPointerProperties::PointerType::Mouse:
26 return "mouse"; 29 return "mouse";
27 } 30 }
28 NOTREACHED(); 31 NOTREACHED();
29 return ""; 32 return "";
30 } 33 }
31 34
32 const AtomicString& pointerEventNameForMouseEventName( 35 const AtomicString& pointerEventNameForMouseEventName(
33 const AtomicString& mouseEventName) 36 const AtomicString& mouseEventName)
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 if (properties.pointerType 397 if (properties.pointerType
395 == WebPointerProperties::PointerType::Mouse) 398 == WebPointerProperties::PointerType::Mouse)
396 return PointerEventFactory::s_mouseId; 399 return PointerEventFactory::s_mouseId;
397 IncomingId id(properties.pointerType, properties.id); 400 IncomingId id(properties.pointerType, properties.id);
398 if (m_pointerIncomingIdMapping.contains(id)) 401 if (m_pointerIncomingIdMapping.contains(id))
399 return m_pointerIncomingIdMapping.get(id); 402 return m_pointerIncomingIdMapping.get(id);
400 return PointerEventFactory::s_invalidId; 403 return PointerEventFactory::s_invalidId;
401 } 404 }
402 405
403 } // namespace blink 406 } // namespace blink
OLDNEW
« no previous file with comments | « ppapi/c/ppb_input_event.h ('k') | third_party/WebKit/public/platform/WebPointerProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698