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

Unified Diff: components/scheduler/renderer/user_model.h

Issue 1683583002: Report user actions when gesture starts and stops in user_model. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 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
Index: components/scheduler/renderer/user_model.h
diff --git a/components/scheduler/renderer/user_model.h b/components/scheduler/renderer/user_model.h
index f93b10beadcfa0f2cfbffed5454f3d3e62b2ba35..5025088d4422a369025650d6a10d7d7ebb762fd3 100644
--- a/components/scheduler/renderer/user_model.h
+++ b/components/scheduler/renderer/user_model.h
@@ -12,11 +12,15 @@
#include "components/scheduler/scheduler_export.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
+namespace base {
+class SingleThreadTaskRunner;
+}
+
namespace scheduler {
class SCHEDULER_EXPORT UserModel {
public:
- UserModel();
+ UserModel(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
alex clarke (OOO till 29th) 2016/02/12 16:21:50 nit: explicit and s/task_runner/default_task_runne
beaudoin 2016/03/16 20:47:39 Done.
~UserModel();
// Tells us that the system started processing an input event. Must be paired
@@ -67,6 +71,9 @@ class SCHEDULER_EXPORT UserModel {
const base::TimeTicks now,
base::TimeDelta* prediction_valid_duration) const;
+ // Task runner used to execute tasks on the main thread.
+ scoped_refptr<base::SingleThreadTaskRunner> default_task_runner_;
+
int pending_input_event_count_;
base::TimeTicks last_input_signal_time_;
base::TimeTicks last_gesture_start_time_;

Powered by Google App Engine
This is Rietveld 408576698