Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: mojo/services/tracing/interfaces/tracing.mojom

Issue 1454113003: Require an explicit ServiceName annotation for interfaces in C++. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 [DartPackage="mojo_services"] 5 [DartPackage="mojo_services"]
6 module tracing; 6 module tracing;
7 7
8 // To participate in the tracing ecosystem, implement the TraceProvider 8 // To participate in the tracing ecosystem, implement the TraceProvider
9 // interface and connect to the tracing app. Then, when the provider's Start() 9 // 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 10 // function is called collect tracing data and pass it back via the provided
11 // TraceRecorder interface up until Stop() is called. 11 // TraceRecorder interface up until Stop() is called.
12 12
13 [ServiceName="tracing::TraceProvider"]
13 interface TraceProvider { 14 interface TraceProvider {
14 // Categories can either be the empty string to mean the default set of 15 // Categories can either be the empty string to mean the default set of
15 // categories or a comma-delimited list of categories to trace. 16 // categories or a comma-delimited list of categories to trace.
16 StartTracing(string categories, TraceRecorder recorder); 17 StartTracing(string categories, TraceRecorder recorder);
17 StopTracing(); 18 StopTracing();
18 }; 19 };
19 20
20 interface TraceRecorder { 21 interface TraceRecorder {
21 Record(string json); 22 Record(string json);
22 }; 23 };
23 24
25 [ServiceName="tracing::TraceCollector"]
24 interface TraceCollector { 26 interface TraceCollector {
25 // Request tracing data from all connected providers to stream to 27 // Request tracing data from all connected providers to stream to
26 // |stream|. 28 // |stream|.
27 Start(handle<data_pipe_producer> stream, string categories); 29 Start(handle<data_pipe_producer> stream, string categories);
28 30
29 // Stop tracing and flush results to the |stream| passed in to Start(). 31 // Stop tracing and flush results to the |stream| passed in to Start().
30 // Closes |stream| when all data is collected. 32 // Closes |stream| when all data is collected.
31 StopAndFlush(); 33 StopAndFlush();
32 }; 34 };
OLDNEW
« no previous file with comments | « mojo/services/terminal/interfaces/terminal_client.mojom ('k') | mojo/services/ui/views/interfaces/view_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698