| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TRACING_CONTROLLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 const base::FilePath& result_file_path, | 143 const base::FilePath& result_file_path, |
| 144 const TracingFileResultCallback& callback) = 0; | 144 const TracingFileResultCallback& callback) = 0; |
| 145 | 145 |
| 146 // Get the maximum across processes of trace buffer percent full state. | 146 // Get the maximum across processes of trace buffer percent full state. |
| 147 // When the TraceBufferPercentFull value is determined, the callback is | 147 // When the TraceBufferPercentFull value is determined, the callback is |
| 148 // called. | 148 // called. |
| 149 typedef base::Callback<void(float)> GetTraceBufferPercentFullCallback; | 149 typedef base::Callback<void(float)> GetTraceBufferPercentFullCallback; |
| 150 virtual bool GetTraceBufferPercentFull( | 150 virtual bool GetTraceBufferPercentFull( |
| 151 const GetTraceBufferPercentFullCallback& callback) = 0; | 151 const GetTraceBufferPercentFullCallback& callback) = 0; |
| 152 | 152 |
| 153 // |callback| will will be called every time the given event occurs on any | 153 // |callback| will be called every time the given event occurs on any |
| 154 // process. | 154 // process. |
| 155 typedef base::Callback<void()> WatchEventCallback; | 155 typedef base::Callback<void()> WatchEventCallback; |
| 156 virtual bool SetWatchEvent(const std::string& category_name, | 156 virtual bool SetWatchEvent(const std::string& category_name, |
| 157 const std::string& event_name, | 157 const std::string& event_name, |
| 158 const WatchEventCallback& callback) = 0; | 158 const WatchEventCallback& callback) = 0; |
| 159 | 159 |
| 160 // Cancel the watch event. If tracing is enabled, this may race with the | 160 // Cancel the watch event. If tracing is enabled, this may race with the |
| 161 // watch event callback. | 161 // watch event callback. |
| 162 virtual bool CancelWatchEvent() = 0; | 162 virtual bool CancelWatchEvent() = 0; |
| 163 | 163 |
| 164 protected: | 164 protected: |
| 165 virtual ~TracingController() {} | 165 virtual ~TracingController() {} |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace content | 168 } // namespace content |
| 169 | 169 |
| 170 #endif // CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ | 170 #endif // CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ |
| OLD | NEW |