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

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

Issue 2567983003: [scheduler] Delay budget-based throttling for 10s after backgrounded. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0fc4578ec39a3aae1848e7ab113af041145d4ff5..c56360d30a9ba62f0e974e49ef6c6fd3427dc7e1 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
@@ -73,6 +73,12 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
void OnThrottlingReported(base::TimeDelta throttling_duration);
+ // Depending on page visibility, either turns budget throttling off, or
+ // schedules a call to enable it after a grace period.
+ void UpdateBackgroundBudgetThrottlingState();
+
+ void EnableBackgroundBudgetThrottling();
+
std::set<WebFrameSchedulerImpl*> frame_schedulers_;
std::set<unsigned long> pending_loads_;
WebScheduler::InterventionReporter* intervention_reporter_; // Not owned.
@@ -88,6 +94,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
bool reported_background_throttling_since_navigation_;
TaskQueueThrottler::TimeBudgetPool*
background_time_budget_pool_; // Not owned.
+ CancelableClosureHolder delayed_background_budget_throttling_enabler_;
WebViewScheduler::WebViewSchedulerSettings* settings_; // Not owned.
DISALLOW_COPY_AND_ASSIGN(WebViewSchedulerImpl);
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698