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 // MSVC++ requires this to be set before any other includes to get M_PI. | 5 // MSVC++ requires this to be set before any other includes to get M_PI. |
| 6 #define _USE_MATH_DEFINES | 6 #define _USE_MATH_DEFINES |
| 7 | 7 |
| 8 #include "ui/events/blink/blink_event_util.h" | 8 #include "ui/events/blink/blink_event_util.h" |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 955 case DomKeyLocation::RIGHT: | 955 case DomKeyLocation::RIGHT: |
| 956 return blink::WebInputEvent::IsRight; | 956 return blink::WebInputEvent::IsRight; |
| 957 case DomKeyLocation::NUMPAD: | 957 case DomKeyLocation::NUMPAD: |
| 958 return blink::WebInputEvent::IsKeyPad; | 958 return blink::WebInputEvent::IsKeyPad; |
| 959 case DomKeyLocation::STANDARD: | 959 case DomKeyLocation::STANDARD: |
| 960 break; | 960 break; |
| 961 } | 961 } |
| 962 return static_cast<blink::WebInputEvent::Modifiers>(0); | 962 return static_cast<blink::WebInputEvent::Modifiers>(0); |
| 963 } | 963 } |
| 964 | 964 |
| 965 bool IsGestureScollOrPinch(WebInputEvent::Type type) { | 965 bool IsGestureScrollFlingOrPinch(WebInputEvent::Type type) { |
|
dtapuska
2017/03/14 15:06:51
Isn't it IsGestureScrollOrFlingOrPinch?
tdresser
2017/03/14 15:27:15
I was reading it with an implicit "," between Scro
chongz
2017/03/14 17:51:24
I've renamed it to |IsGestureScrollOrFlingOrPinch(
| |
| 966 switch (type) { | 966 switch (type) { |
| 967 case blink::WebGestureEvent::GestureScrollBegin: | 967 case blink::WebGestureEvent::GestureScrollBegin: |
| 968 case blink::WebGestureEvent::GestureScrollUpdate: | 968 case blink::WebGestureEvent::GestureScrollUpdate: |
| 969 case blink::WebGestureEvent::GestureScrollEnd: | 969 case blink::WebGestureEvent::GestureScrollEnd: |
| 970 case blink::WebGestureEvent::GestureFlingStart: | |
| 971 case blink::WebGestureEvent::GestureFlingCancel: | |
| 970 case blink::WebGestureEvent::GesturePinchBegin: | 972 case blink::WebGestureEvent::GesturePinchBegin: |
| 971 case blink::WebGestureEvent::GesturePinchUpdate: | 973 case blink::WebGestureEvent::GesturePinchUpdate: |
| 972 case blink::WebGestureEvent::GesturePinchEnd: | 974 case blink::WebGestureEvent::GesturePinchEnd: |
| 973 return true; | 975 return true; |
| 974 default: | 976 default: |
| 975 return false; | 977 return false; |
| 976 } | 978 } |
| 977 } | 979 } |
| 978 | 980 |
| 979 bool IsContinuousGestureEvent(WebInputEvent::Type type) { | 981 bool IsContinuousGestureEvent(WebInputEvent::Type type) { |
| 980 switch (type) { | 982 switch (type) { |
| 981 case blink::WebGestureEvent::GestureScrollUpdate: | 983 case blink::WebGestureEvent::GestureScrollUpdate: |
| 982 case blink::WebGestureEvent::GesturePinchUpdate: | 984 case blink::WebGestureEvent::GesturePinchUpdate: |
| 983 return true; | 985 return true; |
| 984 default: | 986 default: |
| 985 return false; | 987 return false; |
| 986 } | 988 } |
| 987 } | 989 } |
| 988 | 990 |
| 989 } // namespace ui | 991 } // namespace ui |
| OLD | NEW |