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

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

Issue 2109843003: Adds enableVirtualTime and setVirtualTimePolicy To Emulation domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layering issue Created 4 years, 6 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/WebViewScheduler.h
diff --git a/third_party/WebKit/public/platform/WebViewScheduler.h b/third_party/WebKit/public/platform/WebViewScheduler.h
index 3635b784a04c751614fee6653e7850d56ea7553a..81999121b80441723c58a890933902b76dc04be6 100644
--- a/third_party/WebKit/public/platform/WebViewScheduler.h
+++ b/third_party/WebKit/public/platform/WebViewScheduler.h
@@ -16,7 +16,8 @@ class WebFrameScheduler;
class BLINK_PLATFORM_EXPORT WebViewScheduler {
public:
- virtual ~WebViewScheduler() { }
+ WebViewScheduler();
+ virtual ~WebViewScheduler();
// The scheduler may throttle tasks associated with background pages.
virtual void setPageVisible(bool) = 0;
@@ -44,6 +45,24 @@ public:
// fast forward so that the system doesn't actually sleep for the delays between
// tasks before executing them.
virtual void setAllowVirtualTimeToAdvance(bool) = 0;
+
+ // Returns true if virtual time is allowed to advance.
+ virtual bool virtualTimeAllowedToAdvance() const = 0;
+
+ void incrementPendingResourceLoadCount();
Sami 2016/07/01 14:46:30 Could you add these on the WebFrameScheduler inste
alex clarke (OOO till 29th) 2016/07/01 15:53:23 Done.
+ void decrementPendingResourceLoadCount();
+
+ enum class VirtualTimePolicy {
+ ADVANCE,
+ PAUSE,
+ PAUSE_IF_NETWORK_FETCHES_PENDING
+ };
+
+ void setVirtualTimePolicy(VirtualTimePolicy);
+
+private:
+ int m_pendingResourceLoadCount;
+ VirtualTimePolicy m_virtualTimePolicy;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698