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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_controller.h

Issue 2886263002: input: Dispatch synthesized events at regular intervals. (Closed)
Patch Set: . Created 3 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/input/synthetic_gesture_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/synthetic_gesture_controller.h
diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller.h b/content/browser/renderer_host/input/synthetic_gesture_controller.h
index ed11a5ad214b88c65f80393cc1458c9b2347abf3..176230098cbcc45983e30f6cb141e6d1985df6b7 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_controller.h
+++ b/content/browser/renderer_host/input/synthetic_gesture_controller.h
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
+#include "base/timer/timer.h"
#include "content/browser/renderer_host/input/synthetic_gesture.h"
#include "content/common/content_export.h"
#include "content/common/input/synthetic_gesture_params.h"
@@ -54,8 +55,11 @@ class CONTENT_EXPORT SyntheticGestureController {
bool DispatchNextEvent(base::TimeTicks = base::TimeTicks::Now());
private:
+ friend class SyntheticGestureControllerTestBase;
+
void RequestBeginFrame();
void OnBeginFrame();
+ void StartTimer();
void StartGesture(const SyntheticGesture& gesture);
void StopGesture(const SyntheticGesture& gesture,
@@ -111,6 +115,7 @@ class CONTENT_EXPORT SyntheticGestureController {
DISALLOW_COPY_AND_ASSIGN(GestureAndCallbackQueue);
} pending_gesture_queue_;
+ base::RepeatingTimer dispatch_timer_;
base::WeakPtrFactory<SyntheticGestureController> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(SyntheticGestureController);
« no previous file with comments | « no previous file | content/browser/renderer_host/input/synthetic_gesture_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698