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

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

Issue 2476973002: [scheduler] Report background timer throttling intervention. (Closed)
Patch Set: base::Optional<base::Callback> -> base::Callback Created 4 years, 1 month 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 f7d1da38a65107ddc919971e4b51edc347435fd5..c29eb2c5c50fd9ffa0b39a30f8107e62869df4d2 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
@@ -57,6 +57,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
void IncrementBackgroundParserCount();
void DecrementBackgroundParserCount();
void Unregister(WebFrameSchedulerImpl* frame_scheduler);
+ void OnNavigation();
bool IsAudioPlaying() const;
@@ -71,6 +72,8 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
void setAllowVirtualTimeToAdvance(bool allow_virtual_time_to_advance);
void ApplyVirtualTimePolicy();
+ void OnThrottlingReported(base::TimeDelta throttling_duration);
+
std::set<WebFrameSchedulerImpl*> frame_schedulers_;
std::set<unsigned long> pending_loads_;
WebScheduler::InterventionReporter* intervention_reporter_; // Not owned.
@@ -83,6 +86,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
bool have_seen_loading_task_;
bool virtual_time_;
bool is_audio_playing_;
+ bool reported_background_throttling_since_navigation_;
TaskQueueThrottler::TimeBudgetPool*
background_time_budget_pool_; // Not owned.

Powered by Google App Engine
This is Rietveld 408576698