Chromium Code Reviews| 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); |
| }; |