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

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: Removed include 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..32268ebbd27ed9aabf28a401c81d132b2cb6708b 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 OnWebSocketConnectionUpdated();
+
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.
+ void UpdateBackgroundBudgetPoolThrottlingState();
+
void EnableBackgroundThrottling();
std::set<WebFrameSchedulerImpl*> frame_schedulers_;
@@ -99,6 +106,8 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
bool virtual_time_;
bool is_audio_playing_;
bool reported_background_throttling_since_navigation_;
+ int has_websocket_connection_;
alex clarke (OOO till 29th) 2017/01/24 18:15:34 bool?
altimin 2017/01/24 18:39:04 Done.
+ int websocket_connections_;
alex clarke (OOO till 29th) 2017/01/24 18:15:34 unused?
altimin 2017/01/24 18:39:04 Done.
TaskQueueThrottler::TimeBudgetPool*
background_time_budget_pool_; // Not owned.
CancelableClosureHolder delayed_background_throttling_enabler_;

Powered by Google App Engine
This is Rietveld 408576698