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

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

Issue 1753013002: Mojom runtime type info: New implementation for Dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: No changes to sha1s Created 4 years, 9 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 sensors_mojom; 5 library sensors_mojom;
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:mojo/bindings.dart' as bindings; 7 import 'package:mojo/bindings.dart' as bindings;
8 import 'package:mojo/core.dart' as core; 8 import 'package:mojo/core.dart' as core;
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer; 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 default: 174 default:
175 return null; 175 return null;
176 } 176 }
177 } 177 }
178 178
179 int toJson() => mojoEnumValue; 179 int toJson() => mojoEnumValue;
180 } 180 }
181 181
182 182
183 183
184
185
186 class SensorData extends bindings.Struct { 184 class SensorData extends bindings.Struct {
187 static const List<bindings.StructDataHeader> kVersions = const [ 185 static const List<bindings.StructDataHeader> kVersions = const [
188 const bindings.StructDataHeader(32, 0) 186 const bindings.StructDataHeader(32, 0)
189 ]; 187 ];
190 int accuracy = 0; 188 int accuracy = 0;
191 int timeStamp = 0; 189 int timeStamp = 0;
192 List<double> values = null; 190 List<double> values = null;
193 191
194 SensorData() : super(kVersions.last.size); 192 SensorData() : super(kVersions.last.size);
195 193
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 Map toJson() { 274 Map toJson() {
277 Map map = new Map(); 275 Map map = new Map();
278 map["accuracy"] = accuracy; 276 map["accuracy"] = accuracy;
279 map["timeStamp"] = timeStamp; 277 map["timeStamp"] = timeStamp;
280 map["values"] = values; 278 map["values"] = values;
281 return map; 279 return map;
282 } 280 }
283 } 281 }
284 282
285 283
286
287
288 class _SensorListenerOnAccuracyChangedParams extends bindings.Struct { 284 class _SensorListenerOnAccuracyChangedParams extends bindings.Struct {
289 static const List<bindings.StructDataHeader> kVersions = const [ 285 static const List<bindings.StructDataHeader> kVersions = const [
290 const bindings.StructDataHeader(16, 0) 286 const bindings.StructDataHeader(16, 0)
291 ]; 287 ];
292 int accuracy = 0; 288 int accuracy = 0;
293 289
294 _SensorListenerOnAccuracyChangedParams() : super(kVersions.last.size); 290 _SensorListenerOnAccuracyChangedParams() : super(kVersions.last.size);
295 291
296 static _SensorListenerOnAccuracyChangedParams deserialize(bindings.Message mes sage) { 292 static _SensorListenerOnAccuracyChangedParams deserialize(bindings.Message mes sage) {
297 var decoder = new bindings.Decoder(message); 293 var decoder = new bindings.Decoder(message);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 346 }
351 347
352 Map toJson() { 348 Map toJson() {
353 Map map = new Map(); 349 Map map = new Map();
354 map["accuracy"] = accuracy; 350 map["accuracy"] = accuracy;
355 return map; 351 return map;
356 } 352 }
357 } 353 }
358 354
359 355
360
361
362 class _SensorListenerOnSensorChangedParams extends bindings.Struct { 356 class _SensorListenerOnSensorChangedParams extends bindings.Struct {
363 static const List<bindings.StructDataHeader> kVersions = const [ 357 static const List<bindings.StructDataHeader> kVersions = const [
364 const bindings.StructDataHeader(16, 0) 358 const bindings.StructDataHeader(16, 0)
365 ]; 359 ];
366 SensorData data = null; 360 SensorData data = null;
367 361
368 _SensorListenerOnSensorChangedParams() : super(kVersions.last.size); 362 _SensorListenerOnSensorChangedParams() : super(kVersions.last.size);
369 363
370 static _SensorListenerOnSensorChangedParams deserialize(bindings.Message messa ge) { 364 static _SensorListenerOnSensorChangedParams deserialize(bindings.Message messa ge) {
371 var decoder = new bindings.Decoder(message); 365 var decoder = new bindings.Decoder(message);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 419 }
426 420
427 Map toJson() { 421 Map toJson() {
428 Map map = new Map(); 422 Map map = new Map();
429 map["data"] = data; 423 map["data"] = data;
430 return map; 424 return map;
431 } 425 }
432 } 426 }
433 427
434 428
435
436
437 class _SensorServiceAddListenerParams extends bindings.Struct { 429 class _SensorServiceAddListenerParams extends bindings.Struct {
438 static const List<bindings.StructDataHeader> kVersions = const [ 430 static const List<bindings.StructDataHeader> kVersions = const [
439 const bindings.StructDataHeader(24, 0) 431 const bindings.StructDataHeader(24, 0)
440 ]; 432 ];
441 SensorType type = null; 433 SensorType type = null;
442 Object listener = null; 434 Object listener = null;
443 435
444 _SensorServiceAddListenerParams() : super(kVersions.last.size); 436 _SensorServiceAddListenerParams() : super(kVersions.last.size);
445 437
446 static _SensorServiceAddListenerParams deserialize(bindings.Message message) { 438 static _SensorServiceAddListenerParams deserialize(bindings.Message message) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 "type: $type" ", " 506 "type: $type" ", "
515 "listener: $listener" ")"; 507 "listener: $listener" ")";
516 } 508 }
517 509
518 Map toJson() { 510 Map toJson() {
519 throw new bindings.MojoCodecError( 511 throw new bindings.MojoCodecError(
520 'Object containing handles cannot be encoded to JSON.'); 512 'Object containing handles cannot be encoded to JSON.');
521 } 513 }
522 } 514 }
523 515
524
525
526
527 const int _SensorListener_onAccuracyChangedName = 0; 516 const int _SensorListener_onAccuracyChangedName = 0;
528 const int _SensorListener_onSensorChangedName = 1; 517 const int _SensorListener_onSensorChangedName = 1;
529 518
530
531
532 class _SensorListenerServiceDescription implements service_describer.ServiceDesc ription { 519 class _SensorListenerServiceDescription implements service_describer.ServiceDesc ription {
533 dynamic getTopLevelInterface([Function responseFactory]) => 520 dynamic getTopLevelInterface([Function responseFactory]) =>
534 responseFactory(null); 521 responseFactory(null);
535 522
536 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 523 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
537 responseFactory(null); 524 responseFactory(null);
538 525
539 dynamic getAllTypeDefinitions([Function responseFactory]) => 526 dynamic getAllTypeDefinitions([Function responseFactory]) =>
540 responseFactory(null); 527 responseFactory(null);
541 } 528 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 static service_describer.ServiceDescription get serviceDescription { 714 static service_describer.ServiceDescription get serviceDescription {
728 if (_cachedServiceDescription == null) { 715 if (_cachedServiceDescription == null) {
729 _cachedServiceDescription = new _SensorListenerServiceDescription(); 716 _cachedServiceDescription = new _SensorListenerServiceDescription();
730 } 717 }
731 return _cachedServiceDescription; 718 return _cachedServiceDescription;
732 } 719 }
733 } 720 }
734 721
735 const int _SensorService_addListenerName = 0; 722 const int _SensorService_addListenerName = 0;
736 723
737
738
739 class _SensorServiceServiceDescription implements service_describer.ServiceDescr iption { 724 class _SensorServiceServiceDescription implements service_describer.ServiceDescr iption {
740 dynamic getTopLevelInterface([Function responseFactory]) => 725 dynamic getTopLevelInterface([Function responseFactory]) =>
741 responseFactory(null); 726 responseFactory(null);
742 727
743 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 728 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
744 responseFactory(null); 729 responseFactory(null);
745 730
746 dynamic getAllTypeDefinitions([Function responseFactory]) => 731 dynamic getAllTypeDefinitions([Function responseFactory]) =>
747 responseFactory(null); 732 responseFactory(null);
748 } 733 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 static service_describer.ServiceDescription get serviceDescription { 905 static service_describer.ServiceDescription get serviceDescription {
921 if (_cachedServiceDescription == null) { 906 if (_cachedServiceDescription == null) {
922 _cachedServiceDescription = new _SensorServiceServiceDescription(); 907 _cachedServiceDescription = new _SensorServiceServiceDescription();
923 } 908 }
924 return _cachedServiceDescription; 909 return _cachedServiceDescription;
925 } 910 }
926 } 911 }
927 912
928 913
929 914
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698