OLD | NEW |
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 Loading... |
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 |
OLD | NEW |