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

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

Issue 2471153002: [scheduler] Use Finch to control background throttling. (Closed)
Patch Set: 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 e724e46f81cead0ee9c476bf77752ea5ca1ed7d0..59d0ea1ecb7706240a44a593297ff22be53f64c5 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
@@ -24,6 +24,8 @@ class SingleThreadTaskRunner;
} // namespace base
namespace blink {
+class WebSettingsImpl;
+
namespace scheduler {
class RendererSchedulerImpl;
@@ -33,6 +35,7 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
public:
WebViewSchedulerImpl(
WebScheduler::InterventionReporter* intervention_reporter,
+ WebSettingsImpl* web_settings,
RendererSchedulerImpl* renderer_scheduler,
bool disable_background_timer_throttling);
@@ -63,11 +66,9 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
bool IsAudioPlaying() const;
- TaskQueueThrottler::TimeBudgetPool* background_time_budget_pool() const {
- return background_time_budget_pool_;
- }
+ TaskQueueThrottler::TimeBudgetPool* BackgroundTimeBudgetPool();
+ void MaybeInitializeBackgroundTimeBudgetPool();
- private:
void setAllowVirtualTimeToAdvance(bool allow_virtual_time_to_advance);
void ApplyVirtualTimePolicy();
@@ -85,6 +86,8 @@ class BLINK_PLATFORM_EXPORT WebViewSchedulerImpl : public WebViewScheduler {
bool is_audio_playing_;
TaskQueueThrottler::TimeBudgetPool*
background_time_budget_pool_; // Not owned.
+ // WebSettings is owned by corresponding WebView.
+ WebSettingsImpl* web_settings_; // Not owned.
alex clarke (OOO till 29th) 2016/11/02 17:53:49 should this be const?
altimin 2016/11/02 21:10:02 Done.
DISALLOW_COPY_AND_ASSIGN(WebViewSchedulerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698