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

Side by Side Diff: Source/web/WebInputEventFactoryMac.mm

Issue 307733002: use enum to specify deviceSource for fling animation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/WebViewImpl.cpp » ('j') | public/platform/Platform.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2006-2009 Google Inc. 3 * Copyright (C) 2006-2009 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 setWebEventLocationFromEventInView(&temp, event, view); 1130 setWebEventLocationFromEventInView(&temp, event, view);
1131 result.x = temp.x; 1131 result.x = temp.x;
1132 result.y = temp.y; 1132 result.y = temp.y;
1133 result.globalX = temp.globalX; 1133 result.globalX = temp.globalX;
1134 result.globalY = temp.globalY; 1134 result.globalY = temp.globalY;
1135 1135
1136 result.modifiers = modifiersFromEvent(event); 1136 result.modifiers = modifiersFromEvent(event);
1137 result.timeStampSeconds = [event timestamp]; 1137 result.timeStampSeconds = [event timestamp];
1138 1138
1139 // MacOS X gestures are used only for pinch support. 1139 // MacOS X gestures are used only for pinch support.
1140 result.sourceDevice = WebGestureEvent::Touchpad; 1140 result.sourceDevice = WebGestureDeviceTouchpad;
1141 switch ([event type]) { 1141 switch ([event type]) {
1142 case NSEventTypeMagnify: 1142 case NSEventTypeMagnify:
1143 result.type = WebInputEvent::GesturePinchUpdate; 1143 result.type = WebInputEvent::GesturePinchUpdate;
1144 result.data.pinchUpdate.scale = [event magnification] + 1.0; 1144 result.data.pinchUpdate.scale = [event magnification] + 1.0;
1145 break; 1145 break;
1146 default: 1146 default:
1147 ASSERT_NOT_REACHED(); 1147 ASSERT_NOT_REACHED();
1148 result.type = WebInputEvent::Undefined; 1148 result.type = WebInputEvent::Undefined;
1149 } 1149 }
1150 1150
1151 return result; 1151 return result;
1152 } 1152 }
1153 1153
1154 } // namespace blink 1154 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebViewImpl.cpp » ('j') | public/platform/Platform.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698