Commit ce037789 authored by alph's avatar alph Committed by Commit bot

[tracing] Introduce TraceStateObserver interface to the platform.

Introduce TraceStateObserver interface along with add/remove
methods to the platform.

BUG=chromium:406277

Review-Url: https://codereview.chromium.org/2344893005
Cr-Commit-Position: refs/heads/master@{#39513}
parent 3f366186
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment