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

Unified Diff: third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h

Issue 2725633002: scheduler: Suspend timers while virtual time is paused (Closed)
Patch Set: Rebased Created 3 years, 9 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/Source/platform/scheduler/renderer/web_view_scheduler_impl.h
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h
index 4f6086173a698b449f25db81e429d3520d81e068..cd05c252a0f786ed29cabfeb46ffe5a1fc0e1432 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h
@@ -45,6 +45,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
std::unique_ptr<WebFrameScheduler> createFrameScheduler(
BlameContext* blame_context) override;
void enableVirtualTime() override;
+ void disableVirtualTimeForTesting() override;
bool virtualTimeAllowedToAdvance() const override;
void setVirtualTimePolicy(VirtualTimePolicy virtual_time_policy) override;
void audioStateChanged(bool is_audio_playing) override;
@@ -76,7 +77,8 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
void MaybeInitializeBackgroundCPUTimeBudgetPool();
void setAllowVirtualTimeToAdvance(bool allow_virtual_time_to_advance);
- void ApplyVirtualTimePolicy();
+ void ApplyVirtualTimePolicyForLoading();
+ void ApplyVirtualTimePolicyToTimers();
void OnThrottlingReported(base::TimeDelta throttling_duration);
@@ -104,6 +106,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
bool should_throttle_frames_;
bool disable_background_timer_throttling_;
bool allow_virtual_time_to_advance_;
+ bool timers_suspended_;
bool have_seen_loading_task_;
bool virtual_time_;
bool is_audio_playing_;

Powered by Google App Engine
This is Rietveld 408576698