| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // An implementation of this interface is passed when constructing a | 33 // An implementation of this interface is passed when constructing a |
| 34 // TraceDataSink, and receives chunks of the final trace data as it's being | 34 // TraceDataSink, and receives chunks of the final trace data as it's being |
| 35 // constructed. | 35 // constructed. |
| 36 // Methods may be called from any thread. | 36 // Methods may be called from any thread. |
| 37 class CONTENT_EXPORT TraceDataEndpoint | 37 class CONTENT_EXPORT TraceDataEndpoint |
| 38 : public base::RefCountedThreadSafe<TraceDataEndpoint> { | 38 : public base::RefCountedThreadSafe<TraceDataEndpoint> { |
| 39 public: | 39 public: |
| 40 virtual void ReceiveTraceChunk(const std::string& chunk) {} | 40 virtual void ReceiveTraceChunk(const std::string& chunk) {} |
| 41 virtual void ReceiveTraceFinalContents( | 41 virtual void ReceiveTraceFinalContents( |
| 42 std::unique_ptr<const base::DictionaryValue> metadata, | 42 std::unique_ptr<const base::DictionaryValue> metadata) {} |
| 43 const std::string& contents) {} | |
| 44 | 43 |
| 45 protected: | 44 protected: |
| 46 friend class base::RefCountedThreadSafe<TraceDataEndpoint>; | 45 friend class base::RefCountedThreadSafe<TraceDataEndpoint>; |
| 47 virtual ~TraceDataEndpoint() {} | 46 virtual ~TraceDataEndpoint() {} |
| 48 }; | 47 }; |
| 49 | 48 |
| 50 class TracingControllerImpl | 49 class TracingControllerImpl |
| 51 : public TracingController, | 50 : public TracingController, |
| 52 public base::trace_event::MemoryDumpManagerDelegate, | 51 public base::trace_event::MemoryDumpManagerDelegate, |
| 53 public base::trace_event::TracingAgent { | 52 public base::trace_event::TracingAgent { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 scoped_refptr<TraceDataSink> trace_data_sink_; | 255 scoped_refptr<TraceDataSink> trace_data_sink_; |
| 257 scoped_refptr<TraceDataSink> monitoring_data_sink_; | 256 scoped_refptr<TraceDataSink> monitoring_data_sink_; |
| 258 std::unique_ptr<base::DictionaryValue> metadata_; | 257 std::unique_ptr<base::DictionaryValue> metadata_; |
| 259 | 258 |
| 260 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); | 259 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); |
| 261 }; | 260 }; |
| 262 | 261 |
| 263 } // namespace content | 262 } // namespace content |
| 264 | 263 |
| 265 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 264 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
| OLD | NEW |