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 library sensors_mojom; | 5 library sensors_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; |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 | 526 |
527 | 527 |
528 | 528 |
529 | 529 |
530 const int _SensorListener_onAccuracyChangedName = 0; | 530 const int _SensorListener_onAccuracyChangedName = 0; |
531 const int _SensorListener_onSensorChangedName = 1; | 531 const int _SensorListener_onSensorChangedName = 1; |
532 | 532 |
533 | 533 |
534 | 534 |
535 class _SensorListenerServiceDescription implements service_describer.ServiceDesc
ription { | 535 class _SensorListenerServiceDescription implements service_describer.ServiceDesc
ription { |
536 dynamic getTopLevelInterface([Function responseFactory]) => null; | 536 dynamic getTopLevelInterface([Function responseFactory]) => |
| 537 responseFactory(null); |
537 | 538 |
538 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; | 539 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 540 responseFactory(null); |
539 | 541 |
540 dynamic getAllTypeDefinitions([Function responseFactory]) => null; | 542 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 543 responseFactory(null); |
541 } | 544 } |
542 | 545 |
543 abstract class SensorListener { | 546 abstract class SensorListener { |
544 static const String serviceName = null; | 547 static const String serviceName = null; |
545 void onAccuracyChanged(int accuracy); | 548 void onAccuracyChanged(int accuracy); |
546 void onSensorChanged(SensorData data); | 549 void onSensorChanged(SensorData data); |
547 } | 550 } |
548 | 551 |
549 | 552 |
550 class _SensorListenerProxyImpl extends bindings.Proxy { | 553 class _SensorListenerProxyImpl extends bindings.Proxy { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 _impl = d; | 719 _impl = d; |
717 } | 720 } |
718 | 721 |
719 String toString() { | 722 String toString() { |
720 var superString = super.toString(); | 723 var superString = super.toString(); |
721 return "SensorListenerStub($superString)"; | 724 return "SensorListenerStub($superString)"; |
722 } | 725 } |
723 | 726 |
724 int get version => 0; | 727 int get version => 0; |
725 | 728 |
726 service_describer.ServiceDescription get serviceDescription => | 729 static service_describer.ServiceDescription _cachedServiceDescription; |
727 new _SensorListenerServiceDescription(); | 730 static service_describer.ServiceDescription get serviceDescription { |
| 731 if (_cachedServiceDescription == null) { |
| 732 _cachedServiceDescription = new _SensorListenerServiceDescription(); |
| 733 } |
| 734 return _cachedServiceDescription; |
| 735 } |
728 } | 736 } |
729 | 737 |
730 const int _SensorService_addListenerName = 0; | 738 const int _SensorService_addListenerName = 0; |
731 | 739 |
732 | 740 |
733 | 741 |
734 class _SensorServiceServiceDescription implements service_describer.ServiceDescr
iption { | 742 class _SensorServiceServiceDescription implements service_describer.ServiceDescr
iption { |
735 dynamic getTopLevelInterface([Function responseFactory]) => null; | 743 dynamic getTopLevelInterface([Function responseFactory]) => |
| 744 responseFactory(null); |
736 | 745 |
737 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; | 746 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 747 responseFactory(null); |
738 | 748 |
739 dynamic getAllTypeDefinitions([Function responseFactory]) => null; | 749 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 750 responseFactory(null); |
740 } | 751 } |
741 | 752 |
742 abstract class SensorService { | 753 abstract class SensorService { |
743 static const String serviceName = "sensors::SensorService"; | 754 static const String serviceName = "sensors::SensorService"; |
744 void addListener(SensorType type, Object listener); | 755 void addListener(SensorType type, Object listener); |
745 } | 756 } |
746 | 757 |
747 | 758 |
748 class _SensorServiceProxyImpl extends bindings.Proxy { | 759 class _SensorServiceProxyImpl extends bindings.Proxy { |
749 _SensorServiceProxyImpl.fromEndpoint( | 760 _SensorServiceProxyImpl.fromEndpoint( |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 _impl = d; | 912 _impl = d; |
902 } | 913 } |
903 | 914 |
904 String toString() { | 915 String toString() { |
905 var superString = super.toString(); | 916 var superString = super.toString(); |
906 return "SensorServiceStub($superString)"; | 917 return "SensorServiceStub($superString)"; |
907 } | 918 } |
908 | 919 |
909 int get version => 0; | 920 int get version => 0; |
910 | 921 |
911 service_describer.ServiceDescription get serviceDescription => | 922 static service_describer.ServiceDescription _cachedServiceDescription; |
912 new _SensorServiceServiceDescription(); | 923 static service_describer.ServiceDescription get serviceDescription { |
| 924 if (_cachedServiceDescription == null) { |
| 925 _cachedServiceDescription = new _SensorServiceServiceDescription(); |
| 926 } |
| 927 return _cachedServiceDescription; |
| 928 } |
913 } | 929 } |
914 | 930 |
915 | 931 |
916 | 932 |
OLD | NEW |