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

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

Issue 2557713007: [scheduler] Delay budget-based throttling for 10s after backgrounded. (Closed)
Patch Set: Address comments 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 efa5c44c16567a02a30e76f426849c5978c4e938..1d9b47578dfb7e415df08941952f43c6d9536960 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
@@ -79,6 +79,12 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
static const char* VirtualTimePolicyToString(
VirtualTimePolicy virtual_time_policy);
+ // 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.
@@ -94,6 +100,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