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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/time_domain.h

Issue 2258133002: [scheduler] Implement time-based cpu throttling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more fix Created 4 years, 3 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/base/time_domain.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
index 360ec49950021659203e9d00fb4db875281d92d4..1400f296d712a45ffe7f813919130e53e4183e25 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
@@ -46,11 +46,13 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
// Called when an empty TaskQueue registered with this TimeDomain has a task
// enqueued.
- virtual void OnTimeDomainHasImmediateWork() = 0;
+ // |task_queue| - task queue which has immediate work scheduled.
+ virtual void OnTimeDomainHasImmediateWork(TaskQueue* task_queue) = 0;
// Called when a TaskQueue registered with this TimeDomain has a delayed
// task enqueued.
- virtual void OnTimeDomainHasDelayedWork() = 0;
+ // |task_queue| - task queue which has delayed work scheduled.
+ virtual void OnTimeDomainHasDelayedWork(TaskQueue* task_queue) = 0;
};
explicit TimeDomain(Observer* observer);
@@ -82,6 +84,7 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
void AsValueInto(base::trace_event::TracedValue* state) const;
// Migrates |queue| from this time domain to |destination_time_domain|.
+ // Main-thread only.
void MigrateQueue(internal::TaskQueueImpl* queue,
TimeDomain* destination_time_domain);

Powered by Google App Engine
This is Rietveld 408576698