| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 public base::trace_event::TracingAgent { | 52 public base::trace_event::TracingAgent { |
| 53 public: | 53 public: |
| 54 // Create an endpoint that may be supplied to any TraceDataSink to | 54 // Create an endpoint that may be supplied to any TraceDataSink to |
| 55 // dump the trace data to a callback. | 55 // dump the trace data to a callback. |
| 56 CONTENT_EXPORT static scoped_refptr<TraceDataEndpoint> CreateCallbackEndpoint( | 56 CONTENT_EXPORT static scoped_refptr<TraceDataEndpoint> CreateCallbackEndpoint( |
| 57 const base::Callback<void(std::unique_ptr<const base::DictionaryValue>, | 57 const base::Callback<void(std::unique_ptr<const base::DictionaryValue>, |
| 58 base::RefCountedString*)>& callback); | 58 base::RefCountedString*)>& callback); |
| 59 | 59 |
| 60 CONTENT_EXPORT static scoped_refptr<TraceDataSink> CreateCompressedStringSink( | 60 CONTENT_EXPORT static scoped_refptr<TraceDataSink> CreateCompressedStringSink( |
| 61 scoped_refptr<TraceDataEndpoint> endpoint); | 61 scoped_refptr<TraceDataEndpoint> endpoint); |
| 62 static scoped_refptr<TraceDataSink> CreateJSONSink( |
| 63 scoped_refptr<TraceDataEndpoint> endpoint); |
| 62 | 64 |
| 63 static TracingControllerImpl* GetInstance(); | 65 static TracingControllerImpl* GetInstance(); |
| 64 | 66 |
| 65 // TracingController implementation. | 67 // TracingController implementation. |
| 66 bool GetCategories(const GetCategoriesDoneCallback& callback) override; | 68 bool GetCategories(const GetCategoriesDoneCallback& callback) override; |
| 67 bool StartTracing(const base::trace_event::TraceConfig& trace_config, | 69 bool StartTracing(const base::trace_event::TraceConfig& trace_config, |
| 68 const StartTracingDoneCallback& callback) override; | 70 const StartTracingDoneCallback& callback) override; |
| 69 bool StopTracing(const scoped_refptr<TraceDataSink>& sink) override; | 71 bool StopTracing(const scoped_refptr<TraceDataSink>& sink) override; |
| 70 bool GetTraceBufferUsage( | 72 bool GetTraceBufferUsage( |
| 71 const GetTraceBufferUsageCallback& callback) override; | 73 const GetTraceBufferUsageCallback& callback) override; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 scoped_refptr<TraceDataSink> trace_data_sink_; | 257 scoped_refptr<TraceDataSink> trace_data_sink_; |
| 256 scoped_refptr<TraceDataSink> monitoring_data_sink_; | 258 scoped_refptr<TraceDataSink> monitoring_data_sink_; |
| 257 std::unique_ptr<base::DictionaryValue> metadata_; | 259 std::unique_ptr<base::DictionaryValue> metadata_; |
| 258 | 260 |
| 259 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); | 261 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); |
| 260 }; | 262 }; |
| 261 | 263 |
| 262 } // namespace content | 264 } // namespace content |
| 263 | 265 |
| 264 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 266 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
| OLD | NEW |