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

Unified Diff: third_party/WebKit/public/platform/WebThread.h

Issue 2259013003: Move and rename TaskTimeTracker to public interface exposed to WebThread, use in WebPerf Agent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remaining fixes for remove observer Created 4 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
Index: third_party/WebKit/public/platform/WebThread.h
diff --git a/third_party/WebKit/public/platform/WebThread.h b/third_party/WebKit/public/platform/WebThread.h
index c9a45b6f57ed9ab753eaf8769be1054f4526a3ff..1a054dcdd7d8beec7c0b5e27fd277c5caf3a4275 100644
--- a/third_party/WebKit/public/platform/WebThread.h
+++ b/third_party/WebKit/public/platform/WebThread.h
@@ -56,6 +56,13 @@ public:
virtual void didProcessTask() = 0;
};
+ class BLINK_PLATFORM_EXPORT TaskTimeObserver {
+ public:
+ virtual ~TaskTimeObserver() { }
+ virtual void willProcessTask() = 0;
Sami 2016/08/19 14:44:56 Could you remind me why we need did/willProcess ag
panicker 2016/08/19 18:06:50 This is to line up the Begin / End with Time Repor
panicker 2016/08/19 18:10:53 If you can suggest a completely different way to h
Sami 2016/08/22 15:51:30 The task observer can also check if it is nested.
+ virtual void didProcessTask() = 0;
+ virtual void reportTaskTime(double, double) = 0;
+ };
// Returns a WebTaskRunner bound to the underlying scheduler's default task queue.
virtual WebTaskRunner* getWebTaskRunner() { return nullptr; }
@@ -65,6 +72,8 @@ public:
virtual void addTaskObserver(TaskObserver*) { }
virtual void removeTaskObserver(TaskObserver*) { }
+ virtual void addTaskTimeObserver(TaskTimeObserver*) { }
+ virtual void removeTaskTimeObserver(TaskTimeObserver*) { }
// Returns the scheduler associated with the thread.
virtual WebScheduler* scheduler() const = 0;

Powered by Google App Engine
This is Rietveld 408576698