OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // TODO(vtl): This file should be split into trace_provider.mojom (containing |
| 6 // TraceProvider and TraceRecorder) and trace_collector.mojom. |
| 7 |
5 [DartPackage="mojo_services"] | 8 [DartPackage="mojo_services"] |
6 module tracing; | 9 module tracing; |
7 | 10 |
8 // To participate in the tracing ecosystem, implement the TraceProvider | 11 // To participate in the tracing ecosystem, implement the TraceProvider |
9 // interface and connect to the tracing app. Then, when the provider's Start() | 12 // interface and connect to the tracing app. Then, when the provider's Start() |
10 // function is called collect tracing data and pass it back via the provided | 13 // function is called collect tracing data and pass it back via the provided |
11 // TraceRecorder interface up until Stop() is called. | 14 // TraceRecorder interface up until Stop() is called. |
12 | 15 |
13 [ServiceName="tracing::TraceProvider"] | 16 [ServiceName="tracing::TraceProvider"] |
14 interface TraceProvider { | 17 interface TraceProvider { |
(...skipping 10 matching lines...) Expand all Loading... |
25 [ServiceName="tracing::TraceCollector"] | 28 [ServiceName="tracing::TraceCollector"] |
26 interface TraceCollector { | 29 interface TraceCollector { |
27 // Request tracing data from all connected providers to stream to | 30 // Request tracing data from all connected providers to stream to |
28 // |stream|. | 31 // |stream|. |
29 Start(handle<data_pipe_producer> stream, string categories); | 32 Start(handle<data_pipe_producer> stream, string categories); |
30 | 33 |
31 // Stop tracing and flush results to the |stream| passed in to Start(). | 34 // Stop tracing and flush results to the |stream| passed in to Start(). |
32 // Closes |stream| when all data is collected. | 35 // Closes |stream| when all data is collected. |
33 StopAndFlush(); | 36 StopAndFlush(); |
34 }; | 37 }; |
OLD | NEW |