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

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

Issue 2476973002: [scheduler] Report background timer throttling intervention. (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/task_queue_throttler.h
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h b/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
index 9829a6814ddcc48893c6dcc8c467824fcd31623a..c74dbf341f47c45ae13adb43ab886326378bd06b 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
@@ -85,6 +85,11 @@ class BLINK_PLATFORM_EXPORT TaskQueueThrottler : public TimeDomain::Observer {
const char* Name() const;
+ // Set callback which will be called every time when this budget pool
+ // is throttled.
Sami 2016/11/04 17:51:49 Please explain what value the callback is given to
alex clarke (OOO till 29th) 2016/11/07 16:53:10 +1 You could consider naming it here.
altimin 2016/11/07 17:25:30 Done.
+ void SetReportingCallback(
+ base::Callback<void(base::TimeDelta)> reporting_callback);
+
// All queues should be removed before calling Close().
void Close();
@@ -141,6 +146,8 @@ class BLINK_PLATFORM_EXPORT TaskQueueThrottler : public TimeDomain::Observer {
std::unordered_set<TaskQueue*> associated_task_queues_;
+ base::Optional<base::Callback<void(base::TimeDelta)>> reporting_callback_;
alex clarke (OOO till 29th) 2016/11/07 16:53:10 Do we really need base::Optional? base::Callback h
+
DISALLOW_COPY_AND_ASSIGN(TimeBudgetPool);
};

Powered by Google App Engine
This is Rietveld 408576698