summaryrefslogtreecommitdiff
path: root/chromium/ui/events/gestures
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/events/gestures')
-rw-r--r--chromium/ui/events/gestures/blink/web_gesture_curve_impl.cc29
-rw-r--r--chromium/ui/events/gestures/blink/web_gesture_curve_impl.h3
-rw-r--r--chromium/ui/events/gestures/gesture_recognizer_impl.h8
3 files changed, 6 insertions, 34 deletions
diff --git a/chromium/ui/events/gestures/blink/web_gesture_curve_impl.cc b/chromium/ui/events/gestures/blink/web_gesture_curve_impl.cc
index 2f2997e8e47..a9901956a9e 100644
--- a/chromium/ui/events/gestures/blink/web_gesture_curve_impl.cc
+++ b/chromium/ui/events/gestures/blink/web_gesture_curve_impl.cc
@@ -32,7 +32,6 @@ namespace {
std::unique_ptr<GestureCurve> CreateDefaultPlatformCurve(
blink::WebGestureDevice device_source,
const gfx::Vector2dF& initial_velocity) {
- DCHECK(!initial_velocity.IsZero());
if (device_source == blink::kWebGestureDeviceSyntheticAutoscroll) {
return base::MakeUnique<FixedVelocityCurve>(initial_velocity,
base::TimeTicks());
@@ -83,37 +82,11 @@ WebGestureCurveImpl::WebGestureCurveImpl(std::unique_ptr<GestureCurve> curve,
ThreadType animating_thread_type)
: curve_(std::move(curve)),
last_offset_(initial_offset),
- animating_thread_type_(animating_thread_type),
ticks_since_first_animate_(0),
first_animate_time_(0),
last_animate_time_(0) {}
-WebGestureCurveImpl::~WebGestureCurveImpl() {
- if (ticks_since_first_animate_ <= 1)
- return;
-
- if (last_animate_time_ <= first_animate_time_)
- return;
-
- switch (animating_thread_type_) {
- case ThreadType::MAIN:
- UMA_HISTOGRAM_CUSTOM_COUNTS(
- "Event.Frequency.Renderer.FlingAnimate",
- gfx::ToRoundedInt(ticks_since_first_animate_ /
- (last_animate_time_ - first_animate_time_)),
- 1, 240, 120);
- break;
- case ThreadType::IMPL:
- UMA_HISTOGRAM_CUSTOM_COUNTS(
- "Event.Frequency.RendererImpl.FlingAnimate",
- gfx::ToRoundedInt(ticks_since_first_animate_ /
- (last_animate_time_ - first_animate_time_)),
- 1, 240, 120);
- break;
- case ThreadType::TEST:
- break;
- }
-}
+WebGestureCurveImpl::~WebGestureCurveImpl() {}
bool WebGestureCurveImpl::Apply(double time,
blink::WebGestureCurveTarget* target) {
diff --git a/chromium/ui/events/gestures/blink/web_gesture_curve_impl.h b/chromium/ui/events/gestures/blink/web_gesture_curve_impl.h
index 076f0169d53..ecadeeb2e5f 100644
--- a/chromium/ui/events/gestures/blink/web_gesture_curve_impl.h
+++ b/chromium/ui/events/gestures/blink/web_gesture_curve_impl.h
@@ -22,7 +22,7 @@ class WebGestureCurveTarget;
namespace ui {
class GestureCurve;
-class WebGestureCurveImpl : public NON_EXPORTED_BASE(blink::WebGestureCurve) {
+class WebGestureCurveImpl : public blink::WebGestureCurve {
public:
static std::unique_ptr<blink::WebGestureCurve> CreateFromDefaultPlatformCurve(
blink::WebGestureDevice device_source,
@@ -53,7 +53,6 @@ class WebGestureCurveImpl : public NON_EXPORTED_BASE(blink::WebGestureCurve) {
gfx::Vector2dF last_offset_;
- ThreadType animating_thread_type_;
int64_t ticks_since_first_animate_;
double first_animate_time_;
double last_animate_time_;
diff --git a/chromium/ui/events/gestures/gesture_recognizer_impl.h b/chromium/ui/events/gestures/gesture_recognizer_impl.h
index f06cf6dc613..52901ce251c 100644
--- a/chromium/ui/events/gestures/gesture_recognizer_impl.h
+++ b/chromium/ui/events/gestures/gesture_recognizer_impl.h
@@ -59,6 +59,10 @@ class EVENTS_EXPORT GestureRecognizerImpl : public GestureRecognizer,
virtual GestureProviderAura* GetGestureProviderForConsumer(
GestureConsumer* c);
+ // Overridden from GestureRecognizer
+ bool ProcessTouchEventPreDispatch(TouchEvent* event,
+ GestureConsumer* consumer) override;
+
private:
// Sets up the target consumer for gestures based on the touch-event.
void SetupTargets(const TouchEvent& event, GestureConsumer* consumer);
@@ -66,10 +70,6 @@ class EVENTS_EXPORT GestureRecognizerImpl : public GestureRecognizer,
void DispatchGestureEvent(GestureConsumer* raw_input_consumer,
GestureEvent* event);
- // Overridden from GestureRecognizer
- bool ProcessTouchEventPreDispatch(TouchEvent* event,
- GestureConsumer* consumer) override;
-
Gestures AckTouchEvent(uint32_t unique_event_id,
ui::EventResult result,
bool is_source_touch_event_set_non_blocking,