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

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: 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..84a33a86ab2c124b53bdf2375c8348a68843979a 100644
--- a/third_party/WebKit/public/platform/WebViewScheduler.h
+++ b/third_party/WebKit/public/platform/WebViewScheduler.h
@@ -8,6 +8,10 @@
#include "WebCommon.h"
#include "public/platform/BlameContext.h"
+#if INSIDE_BLINK
+#include "wtf/Forward.h"
+#endif
+
#include <memory>
namespace blink {
@@ -16,6 +20,7 @@ class WebFrameScheduler;
class BLINK_PLATFORM_EXPORT WebViewScheduler {
public:
+ WebViewScheduler();
virtual ~WebViewScheduler() { }
// The scheduler may throttle tasks associated with background pages.
@@ -44,6 +49,25 @@ public:
// fast forward so that the system doesn't actually sleep for the delays between
// tasks before executing them.
virtual void setAllowVirtualTimeToAdvance(bool) = 0;
+
+ void incrementPendingResorceLoadCount();
Sami 2016/06/29 16:22:27 typo: Resource
alex clarke (OOO till 29th) 2016/06/29 17:08:31 Done.
+ void decrementPendingResorceLoadCount();
+
+ enum class VirtualTimePolicy {
+ ADVANCE,
+ PAUSE,
+ PAUSE_IF_NETWORK_FETCHES_PENDING
+ };
+
+ void setVirtualTimePolicy(VirtualTimePolicy);
+
+#ifdef INSIDE_BLINK
+ void setVirtualTimePolicy(const WTF::String&);
+#endif
+
+private:
+ int m_pendingResourceLoadCount;
+ VirtualTimePolicy m_virtualTimePolicy;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698