| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "public/platform/WebCoalescedInputEvent.h" | 5 #include "public/platform/WebCoalescedInputEvent.h" |
| 6 | 6 |
| 7 #include "public/platform/WebGestureEvent.h" | 7 #include "public/platform/WebGestureEvent.h" |
| 8 #include "public/platform/WebKeyboardEvent.h" |
| 8 #include "public/platform/WebMouseWheelEvent.h" | 9 #include "public/platform/WebMouseWheelEvent.h" |
| 10 #include "public/platform/WebTouchEvent.h" |
| 9 | 11 |
| 10 namespace blink { | 12 namespace blink { |
| 11 | 13 |
| 12 namespace { | 14 namespace { |
| 13 | 15 |
| 14 WebScopedInputEvent makeWebScopedInputEvent(const blink::WebInputEvent& event) { | 16 WebScopedInputEvent makeWebScopedInputEvent(const blink::WebInputEvent& event) { |
| 15 if (blink::WebInputEvent::isGestureEventType(event.type())) { | 17 if (blink::WebInputEvent::isGestureEventType(event.type())) { |
| 16 return WebScopedInputEvent(new blink::WebGestureEvent( | 18 return WebScopedInputEvent(new blink::WebGestureEvent( |
| 17 static_cast<const blink::WebGestureEvent&>(event))); | 19 static_cast<const blink::WebGestureEvent&>(event))); |
| 18 } | 20 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 WebCoalescedInputEvent::WebCoalescedInputEvent( | 116 WebCoalescedInputEvent::WebCoalescedInputEvent( |
| 115 const WebInputEvent& event, | 117 const WebInputEvent& event, |
| 116 const std::vector<const WebInputEvent*>& coalescedEvents) | 118 const std::vector<const WebInputEvent*>& coalescedEvents) |
| 117 : m_event(), m_coalescedEvents(coalescedEvents.size()) { | 119 : m_event(), m_coalescedEvents(coalescedEvents.size()) { |
| 118 m_event = makeWebScopedInputEvent(event); | 120 m_event = makeWebScopedInputEvent(event); |
| 119 for (const auto& coalescedEvent : coalescedEvents) | 121 for (const auto& coalescedEvent : coalescedEvents) |
| 120 m_coalescedEvents.push_back(makeWebScopedInputEvent(*coalescedEvent)); | 122 m_coalescedEvents.push_back(makeWebScopedInputEvent(*coalescedEvent)); |
| 121 } | 123 } |
| 122 | 124 |
| 123 } // namespace blink | 125 } // namespace blink |
| OLD | NEW |