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..5304f1339d089dd13c04f46acefcc32902042bb2 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 useVirtualTime() = 0; |
+ |
+ // Controls whether or not virtual time is allowed to advance. If virtual time |
+ // is not allowed to advance then 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; |
Sami
2016/02/01 11:15:07
Mention that useVirtualTime() must be called befor
alex clarke (OOO till 29th)
2016/02/01 14:16:54
But it can be used in any order.
|
}; |
} // namespace blink |