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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/tracing/tracing.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 years, 10 months 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 library tracing_mojom; 5 library tracing_mojom;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:mojo/bindings.dart' as bindings; 9 import 'package:mojo/bindings.dart' as bindings;
10 import 'package:mojo/core.dart' as core; 10 import 'package:mojo/core.dart' as core;
11 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
12 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
11 13
12 14
13 15
14 class _TraceProviderStartTracingParams extends bindings.Struct { 16 class _TraceProviderStartTracingParams extends bindings.Struct {
15 static const List<bindings.StructDataHeader> kVersions = const [ 17 static const List<bindings.StructDataHeader> kVersions = const [
16 const bindings.StructDataHeader(24, 0) 18 const bindings.StructDataHeader(24, 0)
17 ]; 19 ];
18 String categories = null; 20 String categories = null;
19 Object recorder = null; 21 Object recorder = null;
20 22
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 "recorder: $recorder" ")"; 80 "recorder: $recorder" ")";
79 } 81 }
80 82
81 Map toJson() { 83 Map toJson() {
82 throw new bindings.MojoCodecError( 84 throw new bindings.MojoCodecError(
83 'Object containing handles cannot be encoded to JSON.'); 85 'Object containing handles cannot be encoded to JSON.');
84 } 86 }
85 } 87 }
86 88
87 89
90
91
88 class _TraceProviderStopTracingParams extends bindings.Struct { 92 class _TraceProviderStopTracingParams extends bindings.Struct {
89 static const List<bindings.StructDataHeader> kVersions = const [ 93 static const List<bindings.StructDataHeader> kVersions = const [
90 const bindings.StructDataHeader(8, 0) 94 const bindings.StructDataHeader(8, 0)
91 ]; 95 ];
92 96
93 _TraceProviderStopTracingParams() : super(kVersions.last.size); 97 _TraceProviderStopTracingParams() : super(kVersions.last.size);
94 98
95 static _TraceProviderStopTracingParams deserialize(bindings.Message message) { 99 static _TraceProviderStopTracingParams deserialize(bindings.Message message) {
96 var decoder = new bindings.Decoder(message); 100 var decoder = new bindings.Decoder(message);
97 var result = decode(decoder); 101 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return "_TraceProviderStopTracingParams("")"; 140 return "_TraceProviderStopTracingParams("")";
137 } 141 }
138 142
139 Map toJson() { 143 Map toJson() {
140 Map map = new Map(); 144 Map map = new Map();
141 return map; 145 return map;
142 } 146 }
143 } 147 }
144 148
145 149
150
151
146 class _TraceRecorderRecordParams extends bindings.Struct { 152 class _TraceRecorderRecordParams extends bindings.Struct {
147 static const List<bindings.StructDataHeader> kVersions = const [ 153 static const List<bindings.StructDataHeader> kVersions = const [
148 const bindings.StructDataHeader(16, 0) 154 const bindings.StructDataHeader(16, 0)
149 ]; 155 ];
150 String json = null; 156 String json = null;
151 157
152 _TraceRecorderRecordParams() : super(kVersions.last.size); 158 _TraceRecorderRecordParams() : super(kVersions.last.size);
153 159
154 static _TraceRecorderRecordParams deserialize(bindings.Message message) { 160 static _TraceRecorderRecordParams deserialize(bindings.Message message) {
155 var decoder = new bindings.Decoder(message); 161 var decoder = new bindings.Decoder(message);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 209 }
204 210
205 Map toJson() { 211 Map toJson() {
206 Map map = new Map(); 212 Map map = new Map();
207 map["json"] = json; 213 map["json"] = json;
208 return map; 214 return map;
209 } 215 }
210 } 216 }
211 217
212 218
219
220
213 class _TraceCollectorStartParams extends bindings.Struct { 221 class _TraceCollectorStartParams extends bindings.Struct {
214 static const List<bindings.StructDataHeader> kVersions = const [ 222 static const List<bindings.StructDataHeader> kVersions = const [
215 const bindings.StructDataHeader(24, 0) 223 const bindings.StructDataHeader(24, 0)
216 ]; 224 ];
217 core.MojoDataPipeProducer stream = null; 225 core.MojoDataPipeProducer stream = null;
218 String categories = null; 226 String categories = null;
219 227
220 _TraceCollectorStartParams() : super(kVersions.last.size); 228 _TraceCollectorStartParams() : super(kVersions.last.size);
221 229
222 static _TraceCollectorStartParams deserialize(bindings.Message message) { 230 static _TraceCollectorStartParams deserialize(bindings.Message message) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 "categories: $categories" ")"; 285 "categories: $categories" ")";
278 } 286 }
279 287
280 Map toJson() { 288 Map toJson() {
281 throw new bindings.MojoCodecError( 289 throw new bindings.MojoCodecError(
282 'Object containing handles cannot be encoded to JSON.'); 290 'Object containing handles cannot be encoded to JSON.');
283 } 291 }
284 } 292 }
285 293
286 294
295
296
287 class _TraceCollectorStopAndFlushParams extends bindings.Struct { 297 class _TraceCollectorStopAndFlushParams extends bindings.Struct {
288 static const List<bindings.StructDataHeader> kVersions = const [ 298 static const List<bindings.StructDataHeader> kVersions = const [
289 const bindings.StructDataHeader(8, 0) 299 const bindings.StructDataHeader(8, 0)
290 ]; 300 ];
291 301
292 _TraceCollectorStopAndFlushParams() : super(kVersions.last.size); 302 _TraceCollectorStopAndFlushParams() : super(kVersions.last.size);
293 303
294 static _TraceCollectorStopAndFlushParams deserialize(bindings.Message message) { 304 static _TraceCollectorStopAndFlushParams deserialize(bindings.Message message) {
295 var decoder = new bindings.Decoder(message); 305 var decoder = new bindings.Decoder(message);
296 var result = decode(decoder); 306 var result = decode(decoder);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 String toString() { 344 String toString() {
335 return "_TraceCollectorStopAndFlushParams("")"; 345 return "_TraceCollectorStopAndFlushParams("")";
336 } 346 }
337 347
338 Map toJson() { 348 Map toJson() {
339 Map map = new Map(); 349 Map map = new Map();
340 return map; 350 return map;
341 } 351 }
342 } 352 }
343 353
354
355
356
344 const int _TraceProvider_startTracingName = 0; 357 const int _TraceProvider_startTracingName = 0;
345 const int _TraceProvider_stopTracingName = 1; 358 const int _TraceProvider_stopTracingName = 1;
346 359
360
361
362 class _TraceProviderServiceDescription implements service_describer.ServiceDescr iption {
363 dynamic getTopLevelInterface([Function responseFactory]) => null;
364
365 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
366
367 dynamic getAllTypeDefinitions([Function responseFactory]) => null;
368 }
369
347 abstract class TraceProvider { 370 abstract class TraceProvider {
348 static const String serviceName = "tracing::TraceProvider"; 371 static const String serviceName = "tracing::TraceProvider";
349 void startTracing(String categories, Object recorder); 372 void startTracing(String categories, Object recorder);
350 void stopTracing(); 373 void stopTracing();
351 } 374 }
352 375
353 376
354 class _TraceProviderProxyImpl extends bindings.Proxy { 377 class _TraceProviderProxyImpl extends bindings.Proxy {
355 _TraceProviderProxyImpl.fromEndpoint( 378 _TraceProviderProxyImpl.fromEndpoint(
356 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 379 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
357 380
358 _TraceProviderProxyImpl.fromHandle(core.MojoHandle handle) : 381 _TraceProviderProxyImpl.fromHandle(core.MojoHandle handle) :
359 super.fromHandle(handle); 382 super.fromHandle(handle);
360 383
361 _TraceProviderProxyImpl.unbound() : super.unbound(); 384 _TraceProviderProxyImpl.unbound() : super.unbound();
362 385
363 static _TraceProviderProxyImpl newFromEndpoint( 386 static _TraceProviderProxyImpl newFromEndpoint(
364 core.MojoMessagePipeEndpoint endpoint) { 387 core.MojoMessagePipeEndpoint endpoint) {
365 assert(endpoint.setDescription("For _TraceProviderProxyImpl")); 388 assert(endpoint.setDescription("For _TraceProviderProxyImpl"));
366 return new _TraceProviderProxyImpl.fromEndpoint(endpoint); 389 return new _TraceProviderProxyImpl.fromEndpoint(endpoint);
367 } 390 }
368 391
392 service_describer.ServiceDescription get serviceDescription =>
393 new _TraceProviderServiceDescription();
394
369 void handleResponse(bindings.ServiceMessage message) { 395 void handleResponse(bindings.ServiceMessage message) {
370 switch (message.header.type) { 396 switch (message.header.type) {
371 default: 397 default:
372 proxyError("Unexpected message type: ${message.header.type}"); 398 proxyError("Unexpected message type: ${message.header.type}");
373 close(immediate: true); 399 close(immediate: true);
374 break; 400 break;
375 } 401 }
376 } 402 }
377 403
378 String toString() { 404 String toString() {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 assert(_impl == null); 542 assert(_impl == null);
517 _impl = d; 543 _impl = d;
518 } 544 }
519 545
520 String toString() { 546 String toString() {
521 var superString = super.toString(); 547 var superString = super.toString();
522 return "TraceProviderStub($superString)"; 548 return "TraceProviderStub($superString)";
523 } 549 }
524 550
525 int get version => 0; 551 int get version => 0;
552
553 service_describer.ServiceDescription get serviceDescription =>
554 new _TraceProviderServiceDescription();
526 } 555 }
527 556
528 const int _TraceRecorder_recordName = 0; 557 const int _TraceRecorder_recordName = 0;
529 558
559
560
561 class _TraceRecorderServiceDescription implements service_describer.ServiceDescr iption {
562 dynamic getTopLevelInterface([Function responseFactory]) => null;
563
564 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
565
566 dynamic getAllTypeDefinitions([Function responseFactory]) => null;
567 }
568
530 abstract class TraceRecorder { 569 abstract class TraceRecorder {
531 static const String serviceName = null; 570 static const String serviceName = null;
532 void record(String json); 571 void record(String json);
533 } 572 }
534 573
535 574
536 class _TraceRecorderProxyImpl extends bindings.Proxy { 575 class _TraceRecorderProxyImpl extends bindings.Proxy {
537 _TraceRecorderProxyImpl.fromEndpoint( 576 _TraceRecorderProxyImpl.fromEndpoint(
538 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 577 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
539 578
540 _TraceRecorderProxyImpl.fromHandle(core.MojoHandle handle) : 579 _TraceRecorderProxyImpl.fromHandle(core.MojoHandle handle) :
541 super.fromHandle(handle); 580 super.fromHandle(handle);
542 581
543 _TraceRecorderProxyImpl.unbound() : super.unbound(); 582 _TraceRecorderProxyImpl.unbound() : super.unbound();
544 583
545 static _TraceRecorderProxyImpl newFromEndpoint( 584 static _TraceRecorderProxyImpl newFromEndpoint(
546 core.MojoMessagePipeEndpoint endpoint) { 585 core.MojoMessagePipeEndpoint endpoint) {
547 assert(endpoint.setDescription("For _TraceRecorderProxyImpl")); 586 assert(endpoint.setDescription("For _TraceRecorderProxyImpl"));
548 return new _TraceRecorderProxyImpl.fromEndpoint(endpoint); 587 return new _TraceRecorderProxyImpl.fromEndpoint(endpoint);
549 } 588 }
550 589
590 service_describer.ServiceDescription get serviceDescription =>
591 new _TraceRecorderServiceDescription();
592
551 void handleResponse(bindings.ServiceMessage message) { 593 void handleResponse(bindings.ServiceMessage message) {
552 switch (message.header.type) { 594 switch (message.header.type) {
553 default: 595 default:
554 proxyError("Unexpected message type: ${message.header.type}"); 596 proxyError("Unexpected message type: ${message.header.type}");
555 close(immediate: true); 597 close(immediate: true);
556 break; 598 break;
557 } 599 }
558 } 600 }
559 601
560 String toString() { 602 String toString() {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 assert(_impl == null); 726 assert(_impl == null);
685 _impl = d; 727 _impl = d;
686 } 728 }
687 729
688 String toString() { 730 String toString() {
689 var superString = super.toString(); 731 var superString = super.toString();
690 return "TraceRecorderStub($superString)"; 732 return "TraceRecorderStub($superString)";
691 } 733 }
692 734
693 int get version => 0; 735 int get version => 0;
736
737 service_describer.ServiceDescription get serviceDescription =>
738 new _TraceRecorderServiceDescription();
694 } 739 }
695 740
696 const int _TraceCollector_startName = 0; 741 const int _TraceCollector_startName = 0;
697 const int _TraceCollector_stopAndFlushName = 1; 742 const int _TraceCollector_stopAndFlushName = 1;
698 743
744
745
746 class _TraceCollectorServiceDescription implements service_describer.ServiceDesc ription {
747 dynamic getTopLevelInterface([Function responseFactory]) => null;
748
749 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
750
751 dynamic getAllTypeDefinitions([Function responseFactory]) => null;
752 }
753
699 abstract class TraceCollector { 754 abstract class TraceCollector {
700 static const String serviceName = "tracing::TraceCollector"; 755 static const String serviceName = "tracing::TraceCollector";
701 void start(core.MojoDataPipeProducer stream, String categories); 756 void start(core.MojoDataPipeProducer stream, String categories);
702 void stopAndFlush(); 757 void stopAndFlush();
703 } 758 }
704 759
705 760
706 class _TraceCollectorProxyImpl extends bindings.Proxy { 761 class _TraceCollectorProxyImpl extends bindings.Proxy {
707 _TraceCollectorProxyImpl.fromEndpoint( 762 _TraceCollectorProxyImpl.fromEndpoint(
708 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 763 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
709 764
710 _TraceCollectorProxyImpl.fromHandle(core.MojoHandle handle) : 765 _TraceCollectorProxyImpl.fromHandle(core.MojoHandle handle) :
711 super.fromHandle(handle); 766 super.fromHandle(handle);
712 767
713 _TraceCollectorProxyImpl.unbound() : super.unbound(); 768 _TraceCollectorProxyImpl.unbound() : super.unbound();
714 769
715 static _TraceCollectorProxyImpl newFromEndpoint( 770 static _TraceCollectorProxyImpl newFromEndpoint(
716 core.MojoMessagePipeEndpoint endpoint) { 771 core.MojoMessagePipeEndpoint endpoint) {
717 assert(endpoint.setDescription("For _TraceCollectorProxyImpl")); 772 assert(endpoint.setDescription("For _TraceCollectorProxyImpl"));
718 return new _TraceCollectorProxyImpl.fromEndpoint(endpoint); 773 return new _TraceCollectorProxyImpl.fromEndpoint(endpoint);
719 } 774 }
720 775
776 service_describer.ServiceDescription get serviceDescription =>
777 new _TraceCollectorServiceDescription();
778
721 void handleResponse(bindings.ServiceMessage message) { 779 void handleResponse(bindings.ServiceMessage message) {
722 switch (message.header.type) { 780 switch (message.header.type) {
723 default: 781 default:
724 proxyError("Unexpected message type: ${message.header.type}"); 782 proxyError("Unexpected message type: ${message.header.type}");
725 close(immediate: true); 783 close(immediate: true);
726 break; 784 break;
727 } 785 }
728 } 786 }
729 787
730 String toString() { 788 String toString() {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 assert(_impl == null); 926 assert(_impl == null);
869 _impl = d; 927 _impl = d;
870 } 928 }
871 929
872 String toString() { 930 String toString() {
873 var superString = super.toString(); 931 var superString = super.toString();
874 return "TraceCollectorStub($superString)"; 932 return "TraceCollectorStub($superString)";
875 } 933 }
876 934
877 int get version => 0; 935 int get version => 0;
936
937 service_describer.ServiceDescription get serviceDescription =>
938 new _TraceCollectorServiceDescription();
878 } 939 }
879 940
880 941
942
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698