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

Unified Diff: components/scheduler/child/task_queue_impl.h

Issue 1303353003: scheduler: Disable expensive timers during main thread user input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 5 years, 4 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
« no previous file with comments | « components/scheduler/child/task_queue.h ('k') | components/scheduler/child/task_queue_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/task_queue_impl.h
diff --git a/components/scheduler/child/task_queue_impl.h b/components/scheduler/child/task_queue_impl.h
index 4cd341ca3a696cec7305da8c438e681dbbddb1ee..7aef6caf46c722c74789aea707726ed656865294 100644
--- a/components/scheduler/child/task_queue_impl.h
+++ b/components/scheduler/child/task_queue_impl.h
@@ -78,6 +78,9 @@ class SCHEDULER_EXPORT TaskQueueImpl final : public TaskQueue {
void SetQueuePriority(QueuePriority priority) override;
void PumpQueue() override;
void SetPumpPolicy(PumpPolicy pump_policy) override;
+ void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override;
+ void RemoveTaskObserver(
+ base::MessageLoop::TaskObserver* task_observer) override;
bool NextPendingDelayedTaskRunTime(
base::TimeTicks* next_pending_delayed_task);
@@ -110,6 +113,9 @@ class SCHEDULER_EXPORT TaskQueueImpl final : public TaskQueue {
bool GetQuiescenceMonitored() const { return should_monitor_quiescence_; }
bool GetShouldNotifyObservers() const { return should_notify_observers_; }
+ void NotifyWillProcessTask(const base::PendingTask& pending_task);
+ void NotifyDidProcessTask(const base::PendingTask& pending_task);
+
// Delayed task posted to the underlying run loop, which locks |lock_| and
// calls MoveReadyDelayedTasksToIncomingQueueLocked to process dealyed tasks
// that need to be run now. Thread safe, but in practice it's always called
@@ -191,6 +197,7 @@ class SCHEDULER_EXPORT TaskQueueImpl final : public TaskQueue {
base::ThreadChecker main_thread_checker_;
std::queue<Task> work_queue_;
+ base::ObserverList<base::MessageLoop::TaskObserver> task_observers_;
WakeupPolicy wakeup_policy_;
size_t set_index_;
bool should_monitor_quiescence_;
« no previous file with comments | « components/scheduler/child/task_queue.h ('k') | components/scheduler/child/task_queue_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698