OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/common/input/input_event_stream_validator.h" | 5 #include "content/common/input/input_event_stream_validator.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
| 10 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
10 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 11 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
11 #include "ui/events/blink/web_input_event_traits.h" | 12 #include "ui/events/blink/web_input_event_traits.h" |
12 | 13 |
13 using blink::WebInputEvent; | 14 using blink::WebInputEvent; |
14 using blink::WebGestureEvent; | 15 using blink::WebGestureEvent; |
15 using blink::WebTouchEvent; | 16 using blink::WebTouchEvent; |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 | 19 |
19 InputEventStreamValidator::InputEventStreamValidator() | 20 InputEventStreamValidator::InputEventStreamValidator() |
(...skipping 22 matching lines...) Expand all Loading... |
42 if (gesture.sourceDevice == blink::WebGestureDeviceTouchscreen) | 43 if (gesture.sourceDevice == blink::WebGestureDeviceTouchscreen) |
43 return gesture_validator_.Validate(gesture, error_msg); | 44 return gesture_validator_.Validate(gesture, error_msg); |
44 } else if (WebInputEvent::isTouchEventType(event.type)) { | 45 } else if (WebInputEvent::isTouchEventType(event.type)) { |
45 const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(event); | 46 const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(event); |
46 return touch_validator_.Validate(touch, error_msg); | 47 return touch_validator_.Validate(touch, error_msg); |
47 } | 48 } |
48 return true; | 49 return true; |
49 } | 50 } |
50 | 51 |
51 } // namespace content | 52 } // namespace content |
OLD | NEW |