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

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

Issue 2289273002: Eraser tool type plumbing from ui/events to web events and PPAPI. (Closed)
Patch Set: cleanup 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
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 // MSVC++ requires this to be set before any other includes to get M_PI. 5 // MSVC++ requires this to be set before any other includes to get M_PI.
6 #define _USE_MATH_DEFINES 6 #define _USE_MATH_DEFINES
7 7
8 #include "content/browser/renderer_host/input/motion_event_web.h" 8 #include "content/browser/renderer_host/input/motion_event_web.h"
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 const WebPointerProperties& pointer = event_.touches[pointer_index]; 199 const WebPointerProperties& pointer = event_.touches[pointer_index];
200 200
201 switch (pointer.pointerType) { 201 switch (pointer.pointerType) {
202 case WebPointerProperties::PointerType::Unknown: 202 case WebPointerProperties::PointerType::Unknown:
203 return TOOL_TYPE_UNKNOWN; 203 return TOOL_TYPE_UNKNOWN;
204 case WebPointerProperties::PointerType::Mouse: 204 case WebPointerProperties::PointerType::Mouse:
205 return TOOL_TYPE_MOUSE; 205 return TOOL_TYPE_MOUSE;
206 case WebPointerProperties::PointerType::Pen: 206 case WebPointerProperties::PointerType::Pen:
207 return TOOL_TYPE_STYLUS; 207 return TOOL_TYPE_STYLUS;
208 case WebPointerProperties::PointerType::Eraser:
209 return TOOL_TYPE_ERASER;
208 case WebPointerProperties::PointerType::Touch: 210 case WebPointerProperties::PointerType::Touch:
209 return TOOL_TYPE_FINGER; 211 return TOOL_TYPE_FINGER;
210 } 212 }
211 NOTREACHED() << "Unexpected pointerType"; 213 NOTREACHED() << "Unexpected pointerType";
212 return TOOL_TYPE_UNKNOWN; 214 return TOOL_TYPE_UNKNOWN;
213 } 215 }
214 216
215 int MotionEventWeb::GetButtonState() const { 217 int MotionEventWeb::GetButtonState() const {
216 return 0; 218 return 0;
217 } 219 }
218 220
219 int MotionEventWeb::GetFlags() const { 221 int MotionEventWeb::GetFlags() const {
220 return ui::WebEventModifiersToEventFlags(event_.modifiers); 222 return ui::WebEventModifiersToEventFlags(event_.modifiers);
221 } 223 }
222 224
223 } // namespace content 225 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/event_conversion.cc » ('j') | content/renderer/pepper/event_conversion.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698