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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture_controller_new.h

Issue 62443007: Replace old with new synthetic gesture framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: opt_mouse_move_event_x/y -> opt_start_x/y 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
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_new.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 SyntheticGestureControllerNew {
23 public:
24 explicit SyntheticGestureControllerNew(
25 scoped_ptr<SyntheticGestureTarget> gesture_target);
26 virtual ~SyntheticGestureControllerNew();
27
28 void QueueSyntheticGesture(
29 scoped_ptr<SyntheticGestureNew> 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 SyntheticGestureNew& gesture);
36 void StopGesture(const SyntheticGestureNew& gesture,
37 SyntheticGestureNew::Result result);
38
39 scoped_ptr<SyntheticGestureTarget> gesture_target_;
40 ScopedVector<SyntheticGestureNew> pending_gesture_queue_;
41
42 base::TimeTicks last_tick_time_;
43
44 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureControllerNew);
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