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

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

Issue 2652973002: [scheduler] Plumb websocket information to scheduler (Closed)
Patch Set: Introduce WebFrameScheduler::ActiveConnectionHandle 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 423100f13a68d26e85e99cd0f047a87f829578b3..fa86fc16f6d872759cd09afaa8bcfecb73b10159 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
@@ -63,6 +63,8 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
bool IsAudioPlaying() const;
+ void OnConnectionUpdated();
+
void AsValueInto(base::trace_event::TracedValue* state) const;
private:
@@ -83,6 +85,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 websocket connections.
Sami 2017/01/26 15:53:34 s/websocket/active/ since we're not limiting these
altimin 2017/02/08 15:56:54 Done.
+ void UpdateBackgroundBudgetPoolThrottlingState();
+
void EnableBackgroundThrottling();
std::set<WebFrameSchedulerImpl*> frame_schedulers_;
@@ -99,6 +106,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_;

Powered by Google App Engine
This is Rietveld 408576698