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

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

Issue 2620743002: Don't throttle web views until they've been in the background for 10s (Closed)
Patch Set: Fix asan test issue Created 3 years, 11 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 1d9b47578dfb7e415df08941952f43c6d9536960..423100f13a68d26e85e99cd0f047a87f829578b3 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,11 +79,11 @@ 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();
+ // Depending on page visibility, either turns throttling off, or schedules a
+ // call to enable it after a grace period.
+ void UpdateBackgroundThrottlingState();
- void EnableBackgroundBudgetThrottling();
+ void EnableBackgroundThrottling();
std::set<WebFrameSchedulerImpl*> frame_schedulers_;
std::set<unsigned long> pending_loads_;
@@ -92,6 +92,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
VirtualTimePolicy virtual_time_policy_;
int background_parser_count_;
bool page_visible_;
+ bool should_throttle_frames_;
bool disable_background_timer_throttling_;
bool allow_virtual_time_to_advance_;
bool have_seen_loading_task_;
@@ -100,7 +101,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_;
+ CancelableClosureHolder delayed_background_throttling_enabler_;
WebViewScheduler::WebViewSchedulerSettings* settings_; // Not owned.
DISALLOW_COPY_AND_ASSIGN(WebViewSchedulerImpl);

Powered by Google App Engine
This is Rietveld 408576698