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

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: scheduler: Suspend timers while virtual time is paused 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 d762a11c8ac8d3dc95be6d66603bad0d8c4dae5e..97ed0c1f3cb381d1c8d9447115df2309b5fef814 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
@@ -44,6 +44,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;
@@ -75,7 +76,8 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
void MaybeInitializeBackgroundTimeBudgetPool();
void setAllowVirtualTimeToAdvance(bool allow_virtual_time_to_advance);
- void ApplyVirtualTimePolicy();
+ void ApplyVirtualTimePolicyForLoading();
+ void ApplyVirtualTimePolicyToTimers();
void OnThrottlingReported(base::TimeDelta throttling_duration);
@@ -103,6 +105,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