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

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

Issue 1646583002: [Reland] Per WebViewScheduler virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile 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
« no previous file with comments | « third_party/WebKit/public/platform/WebTaskRunner.h ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebViewScheduler.h
diff --git a/third_party/WebKit/public/platform/WebViewScheduler.h b/third_party/WebKit/public/platform/WebViewScheduler.h
index 0e1630cbbd914909a7405a5e4bb9a7c68848af58..bee6dce80a8e2a3466e21bf534280b8727aafeed 100644
--- a/third_party/WebKit/public/platform/WebViewScheduler.h
+++ b/third_party/WebKit/public/platform/WebViewScheduler.h
@@ -21,6 +21,25 @@ public:
// Creaters a new WebFrameScheduler, the caller is responsible for deleting it.
virtual WebPassOwnPtr<WebFrameScheduler> createFrameScheduler() = 0;
+
+ // Instructs this WebViewScheduler to use virtual time. When virtual time is enabled
+ // the system doesn't actually sleep for the delays between tasks before executing
+ // them. E.g: A-E are delayed tasks
+ //
+ // | A B C D E (normal)
+ // |-----------------------------> time
+ //
+ // |ABCDE (virtual time)
+ // |-----------------------------> time
+ virtual void enableVirtualTime() = 0;
+
+ // Controls whether or not virtual time is allowed to advance. If virtual time
+ // is not allowed to advance then delayed tasks posted to the WebTaskRunners owned
+ // by any child WebFrameSchedulers will be paused. If virtual time is allowed to
+ // advance then tasks will be run in time order (as usual) but virtual time will
+ // fast forward so that the system doesn't actually sleep for the delays between
+ // tasks before executing them.
+ virtual void setAllowVirtualTimeToAdvance(bool) = 0;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/public/platform/WebTaskRunner.h ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698