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

Side by Side Diff: trunk/src/content/browser/renderer_host/input/synthetic_gesture_controller.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_GESTURE_CONTROLLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h"
10 #include "base/time/time.h"
11 #include "content/browser/renderer_host/input/synthetic_gesture.h"
12 #include "content/common/content_export.h"
13 #include "content/common/input/synthetic_gesture_params.h"
14
15 namespace content {
16
17 class SyntheticGestureTarget;
18
19 // Controls a synthetic gesture.
20 // Repeatedly invokes the gesture object's ForwardInputEvent method to send
21 // input events to the platform until the gesture has finished.
22 class CONTENT_EXPORT SyntheticGestureController {
23 public:
24 explicit SyntheticGestureController(
25 scoped_ptr<SyntheticGestureTarget> gesture_target);
26 virtual ~SyntheticGestureController();
27
28 void QueueSyntheticGesture(
29 scoped_ptr<SyntheticGesture> synthetic_gesture);
30
31 // Forward input events of the currently processed gesture.
32 void Flush(base::TimeTicks timestamp);
33
34 private:
35 void StartGesture(const SyntheticGesture& gesture);
36 void StopGesture(const SyntheticGesture& gesture,
37 SyntheticGesture::Result result);
38
39 scoped_ptr<SyntheticGestureTarget> gesture_target_;
40 ScopedVector<SyntheticGesture> pending_gesture_queue_;
41
42 base::TimeTicks last_tick_time_;
43
44 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureController);
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698