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

Unified Diff: components/scheduler/base/task_queue.h

Issue 1447563002: Implement frame attribution (FrameBlamer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sure blame context is initialized early enough Created 4 years, 9 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/base/task_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/task_queue.h
diff --git a/components/scheduler/base/task_queue.h b/components/scheduler/base/task_queue.h
index b20e0777f08362e92b5e2e733c028d1e12e8ef64..b9c24de79255aa7634093a4e682484590bbe3af0 100644
--- a/components/scheduler/base/task_queue.h
+++ b/components/scheduler/base/task_queue.h
@@ -8,8 +8,15 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
+#include "base/trace_event/trace_event.h"
#include "components/scheduler/scheduler_export.h"
+namespace base {
+namespace trace_event {
+class BlameContext;
+}
+}
+
namespace scheduler {
class TimeDomain;
@@ -184,6 +191,12 @@ class SCHEDULER_EXPORT TaskQueue : public base::SingleThreadTaskRunner {
virtual void RemoveTaskObserver(
base::MessageLoop::TaskObserver* task_observer) = 0;
+ // Set the blame context which is entered and left while executing tasks from
+ // this task queue. |blame_context| must be null or outlive this task queue.
+ // Must be called on the thread this TaskQueue was created by.
+ virtual void SetBlameContext(
+ base::trace_event::BlameContext* blame_context) = 0;
+
// Removes the task queue from the previous TimeDomain and adds it to
// |domain|. This is a moderately expensive operation.
virtual void SetTimeDomain(TimeDomain* domain) = 0;
« no previous file with comments | « components/scheduler/BUILD.gn ('k') | components/scheduler/base/task_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698