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

Unified Diff: components/scheduler/child/task_queue.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/BUILD.gn ('k') | components/scheduler/child/task_queue_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/task_queue.h
diff --git a/components/scheduler/child/task_queue.h b/components/scheduler/child/task_queue.h
index 465234ba3b72c6b928fe32845158aafab9097b0c..e4ce9ee50e78a875ad183c0091d4d5dfe051a436 100644
--- a/components/scheduler/child/task_queue.h
+++ b/components/scheduler/child/task_queue.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_
#define COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_
+#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
#include "components/scheduler/scheduler_export.h"
@@ -165,6 +166,13 @@ class SCHEDULER_EXPORT TaskQueue : public base::SingleThreadTaskRunner {
// called on the thread this TaskQueue was created by.
virtual void PumpQueue() = 0;
+ // These functions can only be called on the same thread that the task queue
+ // manager executes its tasks on.
+ virtual void AddTaskObserver(
+ base::MessageLoop::TaskObserver* task_observer) = 0;
+ virtual void RemoveTaskObserver(
+ base::MessageLoop::TaskObserver* task_observer) = 0;
+
protected:
~TaskQueue() override {}
« no previous file with comments | « components/scheduler/BUILD.gn ('k') | components/scheduler/child/task_queue_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698