OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
ncarter (slow)
2016/08/16 21:09:04
2016
chongz
2016/08/17 16:34:19
Done.
| |
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 CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_ | 5 #ifndef UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ |
6 #define CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_ | 6 #define UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include "third_party/WebKit/public/web/WebInputEvent.h" |
9 #include <stdint.h> | 9 #include "ui/events/blink/scoped_web_input_event.h" |
10 | 10 |
11 #include <string> | 11 namespace ui { |
12 | |
13 #include "content/common/input/scoped_web_input_event.h" | |
14 #include "third_party/WebKit/public/web/WebInputEvent.h" | |
15 | |
16 namespace content { | |
17 | 12 |
18 // Utility class for performing operations on and with WebInputEvents. | 13 // Utility class for performing operations on and with WebInputEvents. |
19 class CONTENT_EXPORT WebInputEventTraits { | 14 class WebInputEventTraits { |
20 public: | 15 public: |
21 static const char* GetName(blink::WebInputEvent::Type type); | 16 static const char* GetName(blink::WebInputEvent::Type type); |
22 static std::string ToString(const blink::WebInputEvent& event); | 17 static std::string ToString(const blink::WebInputEvent& event); |
23 static size_t GetSize(blink::WebInputEvent::Type type); | 18 static size_t GetSize(blink::WebInputEvent::Type type); |
24 static ScopedWebInputEvent Clone(const blink::WebInputEvent& event); | 19 static ScopedWebInputEvent Clone(const blink::WebInputEvent& event); |
25 static void Delete(blink::WebInputEvent* event); | 20 static void Delete(blink::WebInputEvent* event); |
26 static bool ShouldBlockEventStream(const blink::WebInputEvent& event); | 21 static bool ShouldBlockEventStream(const blink::WebInputEvent& event); |
27 | 22 |
28 static bool CanCauseScroll(const blink::WebMouseWheelEvent& event); | 23 static bool CanCauseScroll(const blink::WebMouseWheelEvent& event); |
29 | 24 |
30 // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0. | 25 // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0. |
31 static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event); | 26 static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event); |
32 }; | 27 }; |
33 | 28 |
34 } // namespace content | 29 } // namespace ui |
35 | 30 |
36 #endif // CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_ | 31 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ |
OLD | NEW |