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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp

Issue 2639273002: Give WebTouchEvent and WebKeyboardEvent their own headers (Closed)
Patch Set: Rebase Created 3 years, 11 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 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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/KeyboardEventManager.h ('k') | third_party/WebKit/Source/web/WebInputEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698