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

Unified Diff: third_party/WebKit/public/platform/WebTaskRunner.h

Issue 1646583002: [Reland] Per WebViewScheduler virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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: third_party/WebKit/public/platform/WebTaskRunner.h
diff --git a/third_party/WebKit/public/platform/WebTaskRunner.h b/third_party/WebKit/public/platform/WebTaskRunner.h
index defe4a1aedac05b2ce2dd8c4850f1455b2b3bb8d..1f714262ba1a666a8fae60bab981596703bd0830 100644
--- a/third_party/WebKit/public/platform/WebTaskRunner.h
+++ b/third_party/WebKit/public/platform/WebTaskRunner.h
@@ -37,6 +37,24 @@ public:
// Returns a clone of the WebTaskRunner.
virtual WebTaskRunner* clone() = 0;
+ // ---
+
+ // Headless Chrome virtualises time for determinism and performance (fast forwarding
+ // of timers). To make this work some parts of blink (e.g. Timers) need to use virtual
+ // time, however by default new code should use the normal non-virtual time APIs.
+
+ // Returns a double which is the number of seconds since epoch (Jan 1, 1970).
+ // This may represent either the real time, or a virtual time depending on
Sami 2016/02/09 21:00:28 These two functions no longer depend on whether we
alex clarke (OOO till 29th) 2016/02/10 14:58:07 Done.
+ // whether or not the system is currently running a task associated with a
+ // virtual time domain or real time domain.
+ virtual double virtualTimeSeconds() const = 0;
+
+ // Returns a microsecond resolution platform dependant time source.
+ // This may represent either the real time, or a virtual time depending on
+ // whether or not the system is currently running a task associated with a
+ // virtual time domain or real time domain.
+ virtual double monotonicallyIncreasingVirtualTimeSeconds() const = 0;
+
#ifdef INSIDE_BLINK
// Helpers for posting bound functions as tasks.
typedef Function<void()> ClosureTask;
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/public/platform/WebViewScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698