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

Side by Side Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 2510133002: Add getCoalescedEvents API to PointerEvent (Closed)
Patch Set: rebase Created 4 years 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 sourceDevice = WebGestureDeviceTouchpad; 821 sourceDevice = WebGestureDeviceTouchpad;
822 break; 822 break;
823 case GestureSourceTouchscreen: 823 case GestureSourceTouchscreen:
824 sourceDevice = WebGestureDeviceTouchscreen; 824 sourceDevice = WebGestureDeviceTouchscreen;
825 break; 825 break;
826 case GestureSourceUninitialized: 826 case GestureSourceUninitialized:
827 NOTREACHED(); 827 NOTREACHED();
828 } 828 }
829 } 829 }
830 830
831 Vector<PlatformMouseEvent> createPlatformMouseEventVector(
832 Widget* widget,
833 const std::vector<const WebInputEvent*>& coalescedEvents) {
834 Vector<PlatformMouseEvent> result;
835 for (const auto& event : coalescedEvents) {
836 DCHECK(WebInputEvent::isMouseEventType(event->type));
837 result.append(PlatformMouseEventBuilder(
838 widget, static_cast<const WebMouseEvent&>(*event)));
839 }
840 return result;
841 }
842
843 Vector<PlatformTouchEvent> createPlatformTouchEventVector(
844 Widget* widget,
845 const std::vector<const WebInputEvent*>& coalescedEvents) {
846 Vector<PlatformTouchEvent> result;
847 for (const auto& event : coalescedEvents) {
848 DCHECK(WebInputEvent::isTouchEventType(event->type));
849 result.append(PlatformTouchEventBuilder(
850 widget, static_cast<const WebTouchEvent&>(*event)));
851 }
852 return result;
853 }
854
831 } // namespace blink 855 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEventConversion.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698