Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / test / web_gesture_curve_mock.h
blobe103c175e99330f4c4b2cacd0c39039d98d4052d
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_
6 #define CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
10 #include "third_party/WebKit/public/platform/WebGestureCurve.h"
11 #include "third_party/WebKit/public/platform/WebSize.h"
13 // A simple class for mocking a WebGestureCurve. The curve flings at velocity
14 // indefinitely.
15 class WebGestureCurveMock : public blink::WebGestureCurve {
16 public:
17 WebGestureCurveMock(const blink::WebFloatPoint& velocity,
18 const blink::WebSize& cumulative_scroll);
19 virtual ~WebGestureCurveMock();
21 // Returns false if curve has finished and can no longer be applied.
22 virtual bool apply(double time,
23 blink::WebGestureCurveTarget* target) OVERRIDE;
25 private:
26 blink::WebFloatPoint velocity_;
27 blink::WebSize cumulative_scroll_;
29 DISALLOW_COPY_AND_ASSIGN(WebGestureCurveMock);
32 #endif // CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_