Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: trunk/src/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h

Issue 79143002: Revert 236254 "Replace old with new synthetic gesture framework." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H_
7
8 #include "base/time/time.h"
9 #include "content/browser/renderer_host/input/synthetic_gesture.h"
10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
11 #include "content/browser/renderer_host/input/synthetic_web_input_event_builders .h"
12 #include "content/common/content_export.h"
13 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h"
14 #include "third_party/WebKit/public/web/WebInputEvent.h"
15
16 namespace content {
17
18 class CONTENT_EXPORT SyntheticSmoothScrollGesture : public SyntheticGesture {
19 public:
20 explicit SyntheticSmoothScrollGesture(
21 const SyntheticSmoothScrollGestureParams& params);
22 virtual ~SyntheticSmoothScrollGesture();
23
24 virtual SyntheticGesture::Result ForwardInputEvents(
25 const base::TimeDelta& interval, SyntheticGestureTarget* target) OVERRIDE;
26
27 private:
28 SyntheticSmoothScrollGestureParams params_;
29 float current_y_;
30 SyntheticWebTouchEvent touch_event_;
31
32 SyntheticGesture::Result ForwardTouchInputEvents(
33 const base::TimeDelta& interval, SyntheticGestureTarget* target);
34 SyntheticGesture::Result ForwardMouseInputEvents(
35 const base::TimeDelta& interval, SyntheticGestureTarget* target);
36
37 void ForwardTouchEvent(SyntheticGestureTarget* target);
38 void ForwardMouseWheelEvent(SyntheticGestureTarget* target,
39 float delta);
40
41 float GetPositionDelta(const base::TimeDelta& interval);
42
43 bool HasFinished();
44
45 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothScrollGesture);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698