OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium 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 CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_ |
7 | 7 |
8 #include "base/trace_event/trace_event_impl.h" | 8 #include "base/trace_event/trace_event_impl.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // either begin recording or finalize the trace, depending on the config. | 80 // either begin recording or finalize the trace, depending on the config. |
81 // If the trigger specified isn't active in the config, this will do nothing. | 81 // If the trigger specified isn't active in the config, this will do nothing. |
82 virtual void TriggerNamedEvent( | 82 virtual void TriggerNamedEvent( |
83 TriggerHandle trigger_handle, | 83 TriggerHandle trigger_handle, |
84 StartedFinalizingCallback started_callback) = 0; | 84 StartedFinalizingCallback started_callback) = 0; |
85 | 85 |
86 // Registers a manual trigger handle, and returns a TriggerHandle which can | 86 // Registers a manual trigger handle, and returns a TriggerHandle which can |
87 // be passed to DidTriggerHappen(). | 87 // be passed to DidTriggerHappen(). |
88 virtual TriggerHandle RegisterTriggerType(const char* trigger_name) = 0; | 88 virtual TriggerHandle RegisterTriggerType(const char* trigger_name) = 0; |
89 | 89 |
| 90 virtual bool HasActiveScenario() = 0; |
| 91 |
90 virtual void InvalidateTriggerHandlesForTesting() = 0; | 92 virtual void InvalidateTriggerHandlesForTesting() = 0; |
91 virtual void SetTracingEnabledCallbackForTesting( | 93 virtual void SetTracingEnabledCallbackForTesting( |
92 const base::Closure& callback) = 0; | 94 const base::Closure& callback) = 0; |
93 virtual void FireTimerForTesting() = 0; | 95 virtual void FireTimerForTesting() = 0; |
94 virtual bool HasActiveScenarioForTesting() = 0; | |
95 | 96 |
96 protected: | 97 protected: |
97 virtual ~BackgroundTracingManager() {} | 98 virtual ~BackgroundTracingManager() {} |
98 }; | 99 }; |
99 | 100 |
100 } // namespace content | 101 } // namespace content |
101 | 102 |
102 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_ | 103 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_ |
OLD | NEW |