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

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

Issue 2023033003: scheduler: Throttle timers in out-of-view frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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_frame_scheduler_impl.h
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
index e18896d5dfed878761d2ab69a0bfae38e6270760..5c1ff02ba635cefda69aa6c8c60acafc6d760eed 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
@@ -41,6 +41,7 @@ class BLINK_PLATFORM_EXPORT WebFrameSchedulerImpl : public WebFrameScheduler {
// WebFrameScheduler implementation:
void setFrameVisible(bool frame_visible) override;
void setPageVisible(bool page_visible) override;
+ void setCrossOrigin(bool cross_origin) override;
WebTaskRunner* loadingTaskRunner() override;
WebTaskRunner* timerTaskRunner() override;
WebTaskRunner* unthrottledTaskRunner() override;
@@ -54,6 +55,8 @@ class BLINK_PLATFORM_EXPORT WebFrameSchedulerImpl : public WebFrameScheduler {
void DetachFromWebViewScheduler();
void ApplyPolicyToTimerQueue();
+ bool ShouldThrottleTimers() const;
+ void UpdateTimerThrottling(bool was_throttled);
scoped_refptr<TaskQueue> loading_task_queue_;
scoped_refptr<TaskQueue> timer_task_queue_;
@@ -67,6 +70,7 @@ class BLINK_PLATFORM_EXPORT WebFrameSchedulerImpl : public WebFrameScheduler {
TaskQueue::PumpPolicy virtual_time_pump_policy_;
bool frame_visible_;
bool page_visible_;
+ bool cross_origin_;
DISALLOW_COPY_AND_ASSIGN(WebFrameSchedulerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698