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

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

Issue 1135083004: Revert of Remove EF_FUNCTION_KEY and EF_NUMPAD_KEY. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/events/blink/blink_event_util.h" 8 #include "ui/events/blink/blink_event_util.h"
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (flags & EF_LEFT_MOUSE_BUTTON) 170 if (flags & EF_LEFT_MOUSE_BUTTON)
171 modifiers |= blink::WebInputEvent::LeftButtonDown; 171 modifiers |= blink::WebInputEvent::LeftButtonDown;
172 if (flags & EF_MIDDLE_MOUSE_BUTTON) 172 if (flags & EF_MIDDLE_MOUSE_BUTTON)
173 modifiers |= blink::WebInputEvent::MiddleButtonDown; 173 modifiers |= blink::WebInputEvent::MiddleButtonDown;
174 if (flags & EF_RIGHT_MOUSE_BUTTON) 174 if (flags & EF_RIGHT_MOUSE_BUTTON)
175 modifiers |= blink::WebInputEvent::RightButtonDown; 175 modifiers |= blink::WebInputEvent::RightButtonDown;
176 if (flags & EF_CAPS_LOCK_DOWN) 176 if (flags & EF_CAPS_LOCK_DOWN)
177 modifiers |= blink::WebInputEvent::CapsLockOn; 177 modifiers |= blink::WebInputEvent::CapsLockOn;
178 if (flags & EF_IS_REPEAT) 178 if (flags & EF_IS_REPEAT)
179 modifiers |= blink::WebInputEvent::IsAutoRepeat; 179 modifiers |= blink::WebInputEvent::IsAutoRepeat;
180 if (flags & EF_NUMPAD_KEY)
181 modifiers |= blink::WebInputEvent::IsKeyPad;
180 182
181 return modifiers; 183 return modifiers;
182 } 184 }
183 185
184 WebGestureEvent CreateWebGestureEvent(const GestureEventDetails& details, 186 WebGestureEvent CreateWebGestureEvent(const GestureEventDetails& details,
185 base::TimeDelta timestamp, 187 base::TimeDelta timestamp,
186 const gfx::PointF& location, 188 const gfx::PointF& location,
187 const gfx::PointF& raw_location, 189 const gfx::PointF& raw_location,
188 int flags) { 190 int flags) {
189 WebGestureEvent gesture; 191 WebGestureEvent gesture;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 296 }
295 297
296 WebGestureEvent CreateWebGestureEventFromGestureEventData( 298 WebGestureEvent CreateWebGestureEventFromGestureEventData(
297 const GestureEventData& data) { 299 const GestureEventData& data) {
298 return CreateWebGestureEvent(data.details, data.time - base::TimeTicks(), 300 return CreateWebGestureEvent(data.details, data.time - base::TimeTicks(),
299 gfx::PointF(data.x, data.y), 301 gfx::PointF(data.x, data.y),
300 gfx::PointF(data.raw_x, data.raw_y), data.flags); 302 gfx::PointF(data.raw_x, data.raw_y), data.flags);
301 } 303 }
302 304
303 } // namespace ui 305 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/renderer_host/web_input_event_aura_unittest.cc ('k') | ui/events/event_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698