| 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 423100f13a68d26e85e99cd0f047a87f829578b3..d762a11c8ac8d3dc95be6d66603bad0d8c4dae5e 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
|
| @@ -47,6 +47,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
|
| bool virtualTimeAllowedToAdvance() const override;
|
| void setVirtualTimePolicy(VirtualTimePolicy virtual_time_policy) override;
|
| void audioStateChanged(bool is_audio_playing) override;
|
| + bool hasActiveConnectionForTest() const override;
|
|
|
| // Virtual for testing.
|
| virtual void ReportIntervention(const std::string& message);
|
| @@ -63,6 +64,8 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
|
|
|
| bool IsAudioPlaying() const;
|
|
|
| + void OnConnectionUpdated();
|
| +
|
| void AsValueInto(base::trace_event::TracedValue* state) const;
|
|
|
| private:
|
| @@ -83,6 +86,11 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
|
| // call to enable it after a grace period.
|
| void UpdateBackgroundThrottlingState();
|
|
|
| + // As a part of UpdateBackgroundThrottlingState set correct
|
| + // background_time_budget_pool_ state depending on page visibility and
|
| + // number of active connections.
|
| + void UpdateBackgroundBudgetPoolThrottlingState();
|
| +
|
| void EnableBackgroundThrottling();
|
|
|
| std::set<WebFrameSchedulerImpl*> frame_schedulers_;
|
| @@ -99,6 +107,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
|
| bool virtual_time_;
|
| bool is_audio_playing_;
|
| bool reported_background_throttling_since_navigation_;
|
| + bool has_active_connection_;
|
| TaskQueueThrottler::TimeBudgetPool*
|
| background_time_budget_pool_; // Not owned.
|
| CancelableClosureHolder delayed_background_throttling_enabler_;
|
|
|