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

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

Issue 2250233002: Type->String helper function added to WebInputEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blink_Common_export instead of blink_export Created 4 years, 3 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 #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/web/WebInputEvent.h" 8 #include "third_party/WebKit/public/web/WebInputEvent.h"
9 #include "ui/events/blink/scoped_web_input_event.h" 9 #include "ui/events/blink/scoped_web_input_event.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 // Utility class for performing operations on and with WebInputEvents. 13 // Utility class for performing operations on and with WebInputEvents.
14 class WebInputEventTraits { 14 class WebInputEventTraits {
15 public: 15 public:
16 static const char* GetName(blink::WebInputEvent::Type type);
17 static std::string ToString(const blink::WebInputEvent& event); 16 static std::string ToString(const blink::WebInputEvent& event);
18 static size_t GetSize(blink::WebInputEvent::Type type); 17 static size_t GetSize(blink::WebInputEvent::Type type);
19 static ScopedWebInputEvent Clone(const blink::WebInputEvent& event); 18 static ScopedWebInputEvent Clone(const blink::WebInputEvent& event);
20 static void Delete(blink::WebInputEvent* event); 19 static void Delete(blink::WebInputEvent* event);
21 static bool ShouldBlockEventStream(const blink::WebInputEvent& event); 20 static bool ShouldBlockEventStream(const blink::WebInputEvent& event);
22 21
23 static bool CanCauseScroll(const blink::WebMouseWheelEvent& event); 22 static bool CanCauseScroll(const blink::WebMouseWheelEvent& event);
24 23
25 // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0. 24 // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0.
26 static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event); 25 static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event);
27 }; 26 };
28 27
29 } // namespace ui 28 } // namespace ui
30 29
31 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ 30 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698