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

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: Rebased 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 b36378e0bbfc0b6e547699a3dd2869706b6a5190..52c7678eea23ac5de1257546e25a5172f24ea4fa 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
@@ -42,11 +42,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);
@@ -78,6 +80,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