Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BLINK_EVENT_UTIL_H_ | 5 #ifndef UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
| 6 #define UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ | 6 #define UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "third_party/WebKit/public/platform/WebGestureEvent.h" | 10 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 float orientation_rad, | 79 float orientation_rad, |
| 80 float tilt_rad, | 80 float tilt_rad, |
| 81 int android_buttons_changed, | 81 int android_buttons_changed, |
| 82 int tool_type); | 82 int tool_type); |
| 83 | 83 |
| 84 int WebEventModifiersToEventFlags(int modifiers); | 84 int WebEventModifiersToEventFlags(int modifiers); |
| 85 | 85 |
| 86 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( | 86 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( |
| 87 ui::DomCode code); | 87 ui::DomCode code); |
| 88 | 88 |
| 89 bool IsGestureScollOrPinch(blink::WebInputEvent::Type); | 89 bool IsGestureScrollFlingPinch(blink::WebInputEvent::Type); |
| 90 | 90 |
| 91 bool IsContinuousGestureEvent(blink::WebInputEvent::Type); | 91 bool IsContinuousGestureEvent(blink::WebInputEvent::Type); |
| 92 | 92 |
| 93 inline const blink::WebGestureEvent& ToWebGestureEvent( | 93 inline const blink::WebGestureEvent& ToWebGestureEvent( |
| 94 const blink::WebInputEvent& event) { | 94 const blink::WebInputEvent& event) { |
| 95 DCHECK(IsGestureScollOrPinch(event.type())); | 95 DCHECK(IsGestureScrollFlingPinch(event.type())); |
|
tdresser
2017/03/10 15:31:06
It isn't immediately obvious why this DCHECK is he
dtapuska
2017/03/10 15:49:14
I'd really expect the dcheck to be calling this: h
chongz
2017/03/14 14:51:06
Done.
| |
| 96 return static_cast<const blink::WebGestureEvent&>(event); | 96 return static_cast<const blink::WebGestureEvent&>(event); |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace ui | 99 } // namespace ui |
| 100 | 100 |
| 101 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ | 101 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
| OLD | NEW |