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

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

Issue 1646583002: [Reland] Per WebViewScheduler virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try to fix the broken tests Created 4 years, 11 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/Platform.h
diff --git a/third_party/WebKit/public/platform/Platform.h b/third_party/WebKit/public/platform/Platform.h
index 784aa7eb0fb74ccdaaffcba5f33e85c7d258468d..3ba04142cee8482c92c63ba502566c29ab564e8c 100644
--- a/third_party/WebKit/public/platform/Platform.h
+++ b/third_party/WebKit/public/platform/Platform.h
@@ -420,6 +420,12 @@ public:
// it is recommended that the fixed point be no further in the past than the epoch.
virtual double monotonicallyIncreasingTimeSeconds() { return 0; }
+ // Virtual time is used by Headless Chrome for determinism and performance (fast forwarding
+ // of timers). New code should typically use |currentTimeSeconds| and
+ // |monotonicallyIncreasingTimeSeconds| as normal.
+ virtual double virtualTimeSeconds() { return currentTimeSeconds(); }
+ virtual double monotonicallyIncreasingVirtualTimeSeconds() { return monotonicallyIncreasingTimeSeconds(); }
+
// Returns an interface to the main thread. Can be null if blink was initialized on a thread without a message loop.
BLINK_PLATFORM_EXPORT WebThread* mainThread() const;

Powered by Google App Engine
This is Rietveld 408576698