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

Unified Diff: include/v8-platform.h

Issue 2344893005: [tracing] Introduce TraceStateObserver interface to the platform. (Closed)
Patch Set: addressing nit Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-platform.h
diff --git a/include/v8-platform.h b/include/v8-platform.h
index 4023a5b234fd4bb3b084299f6b9a3c2b1a8ffd65..d0b7aed8fc5a333bbef5281f8969db521e91c7af 100644
--- a/include/v8-platform.h
+++ b/include/v8-platform.h
@@ -164,6 +164,19 @@ class Platform {
**/
virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
const char* name, uint64_t handle) {}
+
+ class TraceStateObserver {
+ public:
+ virtual ~TraceStateObserver() = default;
+ virtual void OnTraceEnabled() = 0;
+ virtual void OnTraceDisabled() = 0;
+ };
+
+ /** Adds tracing state change observer. */
+ virtual void AddTraceStateObserver(TraceStateObserver*) {}
+
+ /** Removes tracing state change observer. */
+ virtual void RemoveTraceStateObserver(TraceStateObserver*) {}
};
} // namespace v8
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698