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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_V8_PLATFORM_H_ 5 #ifndef V8_V8_PLATFORM_H_
6 #define V8_V8_PLATFORM_H_ 6 #define V8_V8_PLATFORM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 const uint64_t* arg_values, unsigned int flags) { 157 const uint64_t* arg_values, unsigned int flags) {
158 return 0; 158 return 0;
159 } 159 }
160 160
161 /** 161 /**
162 * Sets the duration field of a COMPLETE trace event. It must be called with 162 * Sets the duration field of a COMPLETE trace event. It must be called with
163 * the handle returned from AddTraceEvent(). 163 * the handle returned from AddTraceEvent().
164 **/ 164 **/
165 virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, 165 virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
166 const char* name, uint64_t handle) {} 166 const char* name, uint64_t handle) {}
167
168 class TraceStateObserver {
169 public:
170 virtual ~TraceStateObserver() = default;
171 virtual void OnTraceEnabled() = 0;
172 virtual void OnTraceDisabled() = 0;
173 };
174
175 /** Adds tracing state change observer. */
176 virtual void AddTraceStateObserver(TraceStateObserver*) {}
177
178 /** Removes tracing state change observer. */
179 virtual void RemoveTraceStateObserver(TraceStateObserver*) {}
167 }; 180 };
168 181
169 } // namespace v8 182 } // namespace v8
170 183
171 #endif // V8_V8_PLATFORM_H_ 184 #endif // V8_V8_PLATFORM_H_
OLDNEW
« 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