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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/trace_event/trace_event_impl.h" | 10 #include "base/trace_event/trace_event_impl.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class BackgroundTracingConfig; | 15 class BackgroundTracingConfig; |
16 struct BackgroundTracingUploadConfig; | |
17 | 16 |
18 // BackgroundTracingManager is used on the browser process to trigger the | 17 // BackgroundTracingManager is used on the browser process to trigger the |
19 // collection of trace data and upload the results. Only the browser UI thread | 18 // collection of trace data and upload the results. Only the browser UI thread |
20 // is allowed to interact with the BackgroundTracingManager. All callbacks are | 19 // is allowed to interact with the BackgroundTracingManager. All callbacks are |
21 // called on the UI thread. | 20 // called on the UI thread. |
22 class BackgroundTracingManager { | 21 class BackgroundTracingManager { |
23 public: | 22 public: |
24 CONTENT_EXPORT static BackgroundTracingManager* GetInstance(); | 23 CONTENT_EXPORT static BackgroundTracingManager* GetInstance(); |
25 | 24 |
26 // ReceiveCallback will will be called on the UI thread every time the | 25 // ReceiveCallback will will be called on the UI thread every time the |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 const base::Closure& callback) = 0; | 97 const base::Closure& callback) = 0; |
99 virtual void FireTimerForTesting() = 0; | 98 virtual void FireTimerForTesting() = 0; |
100 | 99 |
101 protected: | 100 protected: |
102 virtual ~BackgroundTracingManager() {} | 101 virtual ~BackgroundTracingManager() {} |
103 }; | 102 }; |
104 | 103 |
105 } // namespace content | 104 } // namespace content |
106 | 105 |
107 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_ | 106 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_ |
OLD | NEW |