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

Side by Side Diff: ui/events/blink/web_input_event_traits.h

Issue 2581943003: Move WebMouseWheelEvent into its own header file. (Closed)
Patch Set: Fix mac unittest 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 // 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 #ifndef UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ 5 #ifndef UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_
6 #define UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ 6 #define UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_
7 7
8 #include "third_party/WebKit/public/platform/WebGestureEvent.h"
9 #include "third_party/WebKit/public/platform/WebInputEvent.h" 8 #include "third_party/WebKit/public/platform/WebInputEvent.h"
10 #include "ui/events/blink/scoped_web_input_event.h" 9 #include "ui/events/blink/scoped_web_input_event.h"
11 #include "ui/events/latency_info.h" 10 #include "ui/events/latency_info.h"
12 11
12 namespace blink {
13 class WebGestureEvent;
14 class WebMouseWheelEvent;
15 }
16
13 namespace ui { 17 namespace ui {
14 18
15 // Utility class for performing operations on and with WebInputEvents. 19 // Utility class for performing operations on and with WebInputEvents.
16 class WebInputEventTraits { 20 class WebInputEventTraits {
17 public: 21 public:
18 static std::string ToString(const blink::WebInputEvent& event); 22 static std::string ToString(const blink::WebInputEvent& event);
19 static size_t GetSize(blink::WebInputEvent::Type type); 23 static size_t GetSize(blink::WebInputEvent::Type type);
20 static ScopedWebInputEvent Clone(const blink::WebInputEvent& event); 24 static ScopedWebInputEvent Clone(const blink::WebInputEvent& event);
21 static void Delete(blink::WebInputEvent* event); 25 static void Delete(blink::WebInputEvent* event);
22 static bool ShouldBlockEventStream(const blink::WebInputEvent& event); 26 static bool ShouldBlockEventStream(const blink::WebInputEvent& event);
23 27
24 static bool CanCauseScroll(const blink::WebMouseWheelEvent& event); 28 static bool CanCauseScroll(const blink::WebMouseWheelEvent& event);
25 29
26 // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0. 30 // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0.
27 static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event); 31 static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event);
28 static LatencyInfo CreateLatencyInfoForWebGestureEvent( 32 static LatencyInfo CreateLatencyInfoForWebGestureEvent(
29 blink::WebGestureEvent event); 33 const blink::WebGestureEvent& event);
30 }; 34 };
31 35
32 } // namespace ui 36 } // namespace ui
33 37
34 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ 38 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_
OLDNEW
« no previous file with comments | « ui/events/blink/web_input_event_builders_win.h ('k') | ui/events/blink/web_input_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698