OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_TRACING_TRACING_CATEGORY_OBSERVER_H_ | 5 #ifndef V8_TRACING_TRACING_CATEGORY_OBSERVER_H_ |
6 #define V8_TRACING_TRACING_CATEGORY_OBSERVER_H_ | 6 #define V8_TRACING_TRACING_CATEGORY_OBSERVER_H_ |
7 | 7 |
8 #include "include/v8-platform.h" | 8 #include "include/v8-platform.h" |
9 #include "include/v8-tracing.h" | 9 #include "src/base/macros.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace tracing { | 12 namespace tracing { |
13 | 13 |
14 class TracingCategoryObserverImpl : public TracingCategoryObserver, | 14 class TracingCategoryObserver : public Platform::TraceStateObserver { |
15 public Platform::TraceStateObserver { | |
16 public: | 15 public: |
17 TracingCategoryObserverImpl(); | 16 enum Mode { |
18 ~TracingCategoryObserverImpl(); | 17 ENABLED_BY_NATIVE = 1 << 0, |
18 ENABLED_BY_TRACING = 1 << 1, | |
19 }; | |
20 | |
21 static void SetUp(); | |
22 static void TearDown(); | |
19 | 23 |
20 // v8::Platform::TraceStateObserver | 24 // v8::Platform::TraceStateObserver |
21 void OnTraceEnabled() final; | 25 void OnTraceEnabled() final; |
22 void OnTraceDisabled() final; | 26 void OnTraceDisabled() final; |
27 | |
28 ~TracingCategoryObserver() = default; | |
alph
2016/11/02 20:18:23
nit: not needed
lpy
2016/11/02 21:52:27
Done.
| |
29 | |
30 private: | |
31 TracingCategoryObserver() = default; | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(TracingCategoryObserver); | |
23 }; | 34 }; |
24 | 35 |
25 } // namespace tracing | 36 } // namespace tracing |
26 } // namespace v8 | 37 } // namespace v8 |
27 #endif // V8_TRACING_TRACING_CATEGORY_OBSERVER_H_ | 38 #endif // V8_TRACING_TRACING_CATEGORY_OBSERVER_H_ |
OLD | NEW |