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 19 matching lines...) Expand all Loading... |
30 class TraceMessageFilter; | 30 class TraceMessageFilter; |
31 class TracingUI; | 31 class TracingUI; |
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(std::unique_ptr<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 | 43 |
44 protected: | 44 protected: |
45 friend class base::RefCountedThreadSafe<TraceDataEndpoint>; | 45 friend class base::RefCountedThreadSafe<TraceDataEndpoint>; |
46 virtual ~TraceDataEndpoint() {} | 46 virtual ~TraceDataEndpoint() {} |
47 }; | 47 }; |
48 | 48 |
49 class TracingControllerImpl | 49 class TracingControllerImpl |
50 : public TracingController, | 50 : public TracingController, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 scoped_refptr<TraceDataSink> trace_data_sink_; | 255 scoped_refptr<TraceDataSink> trace_data_sink_; |
256 scoped_refptr<TraceDataSink> monitoring_data_sink_; | 256 scoped_refptr<TraceDataSink> monitoring_data_sink_; |
257 std::unique_ptr<base::DictionaryValue> metadata_; | 257 std::unique_ptr<base::DictionaryValue> metadata_; |
258 | 258 |
259 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); | 259 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); |
260 }; | 260 }; |
261 | 261 |
262 } // namespace content | 262 } // namespace content |
263 | 263 |
264 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 264 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
OLD | NEW |