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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture_controller.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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "content/browser/renderer_host/input/synthetic_gesture_new.h" 11 #include "content/browser/renderer_host/input/synthetic_gesture.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/input/synthetic_gesture_params.h" 13 #include "content/common/input/synthetic_gesture_params.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class SyntheticGestureTarget; 17 class SyntheticGestureTarget;
18 18
19 // Controls a synthetic gesture. 19 // Controls a synthetic gesture.
20 // Repeatedly invokes the gesture object's ForwardInputEvent method to send 20 // Repeatedly invokes the gesture object's ForwardInputEvent method to send
21 // input events to the platform until the gesture has finished. 21 // input events to the platform until the gesture has finished.
22 class CONTENT_EXPORT SyntheticGestureControllerNew { 22 class CONTENT_EXPORT SyntheticGestureController {
23 public: 23 public:
24 explicit SyntheticGestureControllerNew( 24 explicit SyntheticGestureController(
25 scoped_ptr<SyntheticGestureTarget> gesture_target); 25 scoped_ptr<SyntheticGestureTarget> gesture_target);
26 virtual ~SyntheticGestureControllerNew(); 26 virtual ~SyntheticGestureController();
27 27
28 void QueueSyntheticGesture( 28 void QueueSyntheticGesture(
29 scoped_ptr<SyntheticGestureNew> synthetic_gesture); 29 scoped_ptr<SyntheticGesture> synthetic_gesture);
30 30
31 // Forward input events of the currently processed gesture. 31 // Forward input events of the currently processed gesture.
32 void Flush(base::TimeTicks timestamp); 32 void Flush(base::TimeTicks timestamp);
33 33
34 private: 34 private:
35 void StartGesture(const SyntheticGestureNew& gesture); 35 void StartGesture(const SyntheticGesture& gesture);
36 void StopGesture(const SyntheticGestureNew& gesture, 36 void StopGesture(const SyntheticGesture& gesture,
37 SyntheticGestureNew::Result result); 37 SyntheticGesture::Result result);
38 38
39 scoped_ptr<SyntheticGestureTarget> gesture_target_; 39 scoped_ptr<SyntheticGestureTarget> gesture_target_;
40 ScopedVector<SyntheticGestureNew> pending_gesture_queue_; 40 ScopedVector<SyntheticGesture> pending_gesture_queue_;
41 41
42 base::TimeTicks last_tick_time_; 42 base::TimeTicks last_tick_time_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureControllerNew); 44 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureController);
45 }; 45 };
46 46
47 } // namespace content 47 } // namespace content
48 48
49 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ 49 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698