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

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

Issue 2798563003: [scheduler] Add TaskQueue::Observer (Closed)
Patch Set: Rebased Created 3 years, 8 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 6179d0124b5b17105345ccd9d518614090edc54b..82db58b8f2cd520c568fbc6135675fe0d309c1f1 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
@@ -36,22 +36,7 @@ class TaskQueueManager;
// changes.
class BLINK_PLATFORM_EXPORT TimeDomain {
public:
- class BLINK_PLATFORM_EXPORT Observer {
- public:
- virtual ~Observer() {}
-
- // Called when an empty TaskQueue registered with this TimeDomain has a task
- // enqueued.
- // |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.
- // |task_queue| - task queue which has delayed work scheduled.
- virtual void OnTimeDomainHasDelayedWork(TaskQueue* task_queue) = 0;
- };
-
- explicit TimeDomain(Observer* observer);
+ TimeDomain();
virtual ~TimeDomain();
// Returns a LazyNow that evaluate this TimeDomain's Now. Can be called from
@@ -86,10 +71,6 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
// the next task was posted to and it returns true. Returns false otherwise.
bool NextScheduledTaskQueue(TaskQueue** out_task_queue) const;
- // Notifies the time domain observer (if any) that |queue| has incoming
- // immediate work.
- void OnQueueHasImmediateWork(internal::TaskQueueImpl* queue);
-
// Schedules a call to TaskQueueImpl::WakeUpForDelayedWork when this
// TimeDomain reaches |delayed_run_time|. This supersedes any previously
// registered wake-up for |queue|.
@@ -161,8 +142,6 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
IntrusiveHeap<ScheduledDelayedWakeUp> delayed_wake_up_queue_;
- Observer* const observer_; // NOT OWNED.
-
base::ThreadChecker main_thread_checker_;
DISALLOW_COPY_AND_ASSIGN(TimeDomain);

Powered by Google App Engine
This is Rietveld 408576698