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

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

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Move and Standardize Mojom Type Functions Created 4 years, 11 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 keyboard_mojom; 5 library keyboard_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 import 'package:mojo_services/mojo/native_viewport.mojom.dart' as native_viewpor t_mojom; 13 import 'package:mojo_services/mojo/native_viewport.mojom.dart' as native_viewpor t_mojom;
12
13 class SubmitAction extends bindings.MojoEnum { 14 class SubmitAction extends bindings.MojoEnum {
14 static const SubmitAction done = const SubmitAction._(0); 15 static const SubmitAction done = const SubmitAction._(0);
15 16
16 const SubmitAction._(int v) : super(v); 17 const SubmitAction._(int v) : super(v);
17 18
18 static const Map<String, SubmitAction> valuesMap = const { 19 static const Map<String, SubmitAction> valuesMap = const {
19 "done": done, 20 "done": done,
20 }; 21 };
21 static const List<SubmitAction> values = const [ 22 static const List<SubmitAction> values = const [
22 done, 23 done,
(...skipping 17 matching lines...) Expand all
40 throw new bindings.MojoCodecError( 41 throw new bindings.MojoCodecError(
41 'Bad value $v for enum SubmitAction.'); 42 'Bad value $v for enum SubmitAction.');
42 } 43 }
43 return result; 44 return result;
44 } 45 }
45 46
46 String toString() { 47 String toString() {
47 switch(this) { 48 switch(this) {
48 case done: 49 case done:
49 return 'SubmitAction.done'; 50 return 'SubmitAction.done';
51 default:
52 return null;
50 } 53 }
51 } 54 }
52 55
53 int toJson() => mojoEnumValue; 56 int toJson() => mojoEnumValue;
54 } 57 }
55 58
59
56 class KeyboardType extends bindings.MojoEnum { 60 class KeyboardType extends bindings.MojoEnum {
57 static const KeyboardType text = const KeyboardType._(0); 61 static const KeyboardType text = const KeyboardType._(0);
58 static const KeyboardType number = const KeyboardType._(1); 62 static const KeyboardType number = const KeyboardType._(1);
59 static const KeyboardType phone = const KeyboardType._(2); 63 static const KeyboardType phone = const KeyboardType._(2);
60 static const KeyboardType datetime = const KeyboardType._(3); 64 static const KeyboardType datetime = const KeyboardType._(3);
61 65
62 const KeyboardType._(int v) : super(v); 66 const KeyboardType._(int v) : super(v);
63 67
64 static const Map<String, KeyboardType> valuesMap = const { 68 static const Map<String, KeyboardType> valuesMap = const {
65 "text": text, 69 "text": text,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 String toString() { 108 String toString() {
105 switch(this) { 109 switch(this) {
106 case text: 110 case text:
107 return 'KeyboardType.text'; 111 return 'KeyboardType.text';
108 case number: 112 case number:
109 return 'KeyboardType.number'; 113 return 'KeyboardType.number';
110 case phone: 114 case phone:
111 return 'KeyboardType.phone'; 115 return 'KeyboardType.phone';
112 case datetime: 116 case datetime:
113 return 'KeyboardType.datetime'; 117 return 'KeyboardType.datetime';
118 default:
119 return null;
114 } 120 }
115 } 121 }
116 122
117 int toJson() => mojoEnumValue; 123 int toJson() => mojoEnumValue;
118 } 124 }
119 125
120 126
121 127
128
129
122 class CompletionData extends bindings.Struct { 130 class CompletionData extends bindings.Struct {
123 static const List<bindings.StructDataHeader> kVersions = const [ 131 static const List<bindings.StructDataHeader> kVersions = const [
124 const bindings.StructDataHeader(40, 0) 132 const bindings.StructDataHeader(40, 0)
125 ]; 133 ];
126 int id = 0; 134 int id = 0;
127 int position = 0; 135 int position = 0;
128 String text = null; 136 String text = null;
129 String label = null; 137 String label = null;
130 138
131 CompletionData() : super(kVersions.last.size); 139 CompletionData() : super(kVersions.last.size);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 Map map = new Map(); 214 Map map = new Map();
207 map["id"] = id; 215 map["id"] = id;
208 map["position"] = position; 216 map["position"] = position;
209 map["text"] = text; 217 map["text"] = text;
210 map["label"] = label; 218 map["label"] = label;
211 return map; 219 return map;
212 } 220 }
213 } 221 }
214 222
215 223
224
225
216 class CorrectionData extends bindings.Struct { 226 class CorrectionData extends bindings.Struct {
217 static const List<bindings.StructDataHeader> kVersions = const [ 227 static const List<bindings.StructDataHeader> kVersions = const [
218 const bindings.StructDataHeader(32, 0) 228 const bindings.StructDataHeader(32, 0)
219 ]; 229 ];
220 int offset = 0; 230 int offset = 0;
221 String oldText = null; 231 String oldText = null;
222 String newText = null; 232 String newText = null;
223 233
224 CorrectionData() : super(kVersions.last.size); 234 CorrectionData() : super(kVersions.last.size);
225 235
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 Map toJson() { 301 Map toJson() {
292 Map map = new Map(); 302 Map map = new Map();
293 map["offset"] = offset; 303 map["offset"] = offset;
294 map["oldText"] = oldText; 304 map["oldText"] = oldText;
295 map["newText"] = newText; 305 map["newText"] = newText;
296 return map; 306 return map;
297 } 307 }
298 } 308 }
299 309
300 310
311
312
301 class _KeyboardClientCommitCompletionParams extends bindings.Struct { 313 class _KeyboardClientCommitCompletionParams extends bindings.Struct {
302 static const List<bindings.StructDataHeader> kVersions = const [ 314 static const List<bindings.StructDataHeader> kVersions = const [
303 const bindings.StructDataHeader(16, 0) 315 const bindings.StructDataHeader(16, 0)
304 ]; 316 ];
305 CompletionData completion = null; 317 CompletionData completion = null;
306 318
307 _KeyboardClientCommitCompletionParams() : super(kVersions.last.size); 319 _KeyboardClientCommitCompletionParams() : super(kVersions.last.size);
308 320
309 static _KeyboardClientCommitCompletionParams deserialize(bindings.Message mess age) { 321 static _KeyboardClientCommitCompletionParams deserialize(bindings.Message mess age) {
310 var decoder = new bindings.Decoder(message); 322 var decoder = new bindings.Decoder(message);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 371 }
360 372
361 Map toJson() { 373 Map toJson() {
362 Map map = new Map(); 374 Map map = new Map();
363 map["completion"] = completion; 375 map["completion"] = completion;
364 return map; 376 return map;
365 } 377 }
366 } 378 }
367 379
368 380
381
382
369 class _KeyboardClientCommitCorrectionParams extends bindings.Struct { 383 class _KeyboardClientCommitCorrectionParams extends bindings.Struct {
370 static const List<bindings.StructDataHeader> kVersions = const [ 384 static const List<bindings.StructDataHeader> kVersions = const [
371 const bindings.StructDataHeader(16, 0) 385 const bindings.StructDataHeader(16, 0)
372 ]; 386 ];
373 CorrectionData correction = null; 387 CorrectionData correction = null;
374 388
375 _KeyboardClientCommitCorrectionParams() : super(kVersions.last.size); 389 _KeyboardClientCommitCorrectionParams() : super(kVersions.last.size);
376 390
377 static _KeyboardClientCommitCorrectionParams deserialize(bindings.Message mess age) { 391 static _KeyboardClientCommitCorrectionParams deserialize(bindings.Message mess age) {
378 var decoder = new bindings.Decoder(message); 392 var decoder = new bindings.Decoder(message);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 441 }
428 442
429 Map toJson() { 443 Map toJson() {
430 Map map = new Map(); 444 Map map = new Map();
431 map["correction"] = correction; 445 map["correction"] = correction;
432 return map; 446 return map;
433 } 447 }
434 } 448 }
435 449
436 450
451
452
437 class _KeyboardClientCommitTextParams extends bindings.Struct { 453 class _KeyboardClientCommitTextParams extends bindings.Struct {
438 static const List<bindings.StructDataHeader> kVersions = const [ 454 static const List<bindings.StructDataHeader> kVersions = const [
439 const bindings.StructDataHeader(24, 0) 455 const bindings.StructDataHeader(24, 0)
440 ]; 456 ];
441 String text = null; 457 String text = null;
442 int newCursorPosition = 0; 458 int newCursorPosition = 0;
443 459
444 _KeyboardClientCommitTextParams() : super(kVersions.last.size); 460 _KeyboardClientCommitTextParams() : super(kVersions.last.size);
445 461
446 static _KeyboardClientCommitTextParams deserialize(bindings.Message message) { 462 static _KeyboardClientCommitTextParams deserialize(bindings.Message message) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 519
504 Map toJson() { 520 Map toJson() {
505 Map map = new Map(); 521 Map map = new Map();
506 map["text"] = text; 522 map["text"] = text;
507 map["newCursorPosition"] = newCursorPosition; 523 map["newCursorPosition"] = newCursorPosition;
508 return map; 524 return map;
509 } 525 }
510 } 526 }
511 527
512 528
529
530
513 class _KeyboardClientDeleteSurroundingTextParams extends bindings.Struct { 531 class _KeyboardClientDeleteSurroundingTextParams extends bindings.Struct {
514 static const List<bindings.StructDataHeader> kVersions = const [ 532 static const List<bindings.StructDataHeader> kVersions = const [
515 const bindings.StructDataHeader(16, 0) 533 const bindings.StructDataHeader(16, 0)
516 ]; 534 ];
517 int beforeLength = 0; 535 int beforeLength = 0;
518 int afterLength = 0; 536 int afterLength = 0;
519 537
520 _KeyboardClientDeleteSurroundingTextParams() : super(kVersions.last.size); 538 _KeyboardClientDeleteSurroundingTextParams() : super(kVersions.last.size);
521 539
522 static _KeyboardClientDeleteSurroundingTextParams deserialize(bindings.Message message) { 540 static _KeyboardClientDeleteSurroundingTextParams deserialize(bindings.Message message) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 597
580 Map toJson() { 598 Map toJson() {
581 Map map = new Map(); 599 Map map = new Map();
582 map["beforeLength"] = beforeLength; 600 map["beforeLength"] = beforeLength;
583 map["afterLength"] = afterLength; 601 map["afterLength"] = afterLength;
584 return map; 602 return map;
585 } 603 }
586 } 604 }
587 605
588 606
607
608
589 class _KeyboardClientSetComposingRegionParams extends bindings.Struct { 609 class _KeyboardClientSetComposingRegionParams extends bindings.Struct {
590 static const List<bindings.StructDataHeader> kVersions = const [ 610 static const List<bindings.StructDataHeader> kVersions = const [
591 const bindings.StructDataHeader(16, 0) 611 const bindings.StructDataHeader(16, 0)
592 ]; 612 ];
593 int start = 0; 613 int start = 0;
594 int end = 0; 614 int end = 0;
595 615
596 _KeyboardClientSetComposingRegionParams() : super(kVersions.last.size); 616 _KeyboardClientSetComposingRegionParams() : super(kVersions.last.size);
597 617
598 static _KeyboardClientSetComposingRegionParams deserialize(bindings.Message me ssage) { 618 static _KeyboardClientSetComposingRegionParams deserialize(bindings.Message me ssage) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 675
656 Map toJson() { 676 Map toJson() {
657 Map map = new Map(); 677 Map map = new Map();
658 map["start"] = start; 678 map["start"] = start;
659 map["end"] = end; 679 map["end"] = end;
660 return map; 680 return map;
661 } 681 }
662 } 682 }
663 683
664 684
685
686
665 class _KeyboardClientSetComposingTextParams extends bindings.Struct { 687 class _KeyboardClientSetComposingTextParams extends bindings.Struct {
666 static const List<bindings.StructDataHeader> kVersions = const [ 688 static const List<bindings.StructDataHeader> kVersions = const [
667 const bindings.StructDataHeader(24, 0) 689 const bindings.StructDataHeader(24, 0)
668 ]; 690 ];
669 String text = null; 691 String text = null;
670 int newCursorPosition = 0; 692 int newCursorPosition = 0;
671 693
672 _KeyboardClientSetComposingTextParams() : super(kVersions.last.size); 694 _KeyboardClientSetComposingTextParams() : super(kVersions.last.size);
673 695
674 static _KeyboardClientSetComposingTextParams deserialize(bindings.Message mess age) { 696 static _KeyboardClientSetComposingTextParams deserialize(bindings.Message mess age) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 753
732 Map toJson() { 754 Map toJson() {
733 Map map = new Map(); 755 Map map = new Map();
734 map["text"] = text; 756 map["text"] = text;
735 map["newCursorPosition"] = newCursorPosition; 757 map["newCursorPosition"] = newCursorPosition;
736 return map; 758 return map;
737 } 759 }
738 } 760 }
739 761
740 762
763
764
741 class _KeyboardClientSetSelectionParams extends bindings.Struct { 765 class _KeyboardClientSetSelectionParams extends bindings.Struct {
742 static const List<bindings.StructDataHeader> kVersions = const [ 766 static const List<bindings.StructDataHeader> kVersions = const [
743 const bindings.StructDataHeader(16, 0) 767 const bindings.StructDataHeader(16, 0)
744 ]; 768 ];
745 int start = 0; 769 int start = 0;
746 int end = 0; 770 int end = 0;
747 771
748 _KeyboardClientSetSelectionParams() : super(kVersions.last.size); 772 _KeyboardClientSetSelectionParams() : super(kVersions.last.size);
749 773
750 static _KeyboardClientSetSelectionParams deserialize(bindings.Message message) { 774 static _KeyboardClientSetSelectionParams deserialize(bindings.Message message) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 831
808 Map toJson() { 832 Map toJson() {
809 Map map = new Map(); 833 Map map = new Map();
810 map["start"] = start; 834 map["start"] = start;
811 map["end"] = end; 835 map["end"] = end;
812 return map; 836 return map;
813 } 837 }
814 } 838 }
815 839
816 840
841
842
817 class _KeyboardClientSubmitParams extends bindings.Struct { 843 class _KeyboardClientSubmitParams extends bindings.Struct {
818 static const List<bindings.StructDataHeader> kVersions = const [ 844 static const List<bindings.StructDataHeader> kVersions = const [
819 const bindings.StructDataHeader(16, 0) 845 const bindings.StructDataHeader(16, 0)
820 ]; 846 ];
821 SubmitAction action = null; 847 SubmitAction action = null;
822 848
823 _KeyboardClientSubmitParams() : super(kVersions.last.size); 849 _KeyboardClientSubmitParams() : super(kVersions.last.size);
824 850
825 static _KeyboardClientSubmitParams deserialize(bindings.Message message) { 851 static _KeyboardClientSubmitParams deserialize(bindings.Message message) {
826 var decoder = new bindings.Decoder(message); 852 var decoder = new bindings.Decoder(message);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 } 904 }
879 905
880 Map toJson() { 906 Map toJson() {
881 Map map = new Map(); 907 Map map = new Map();
882 map["action"] = action; 908 map["action"] = action;
883 return map; 909 return map;
884 } 910 }
885 } 911 }
886 912
887 913
914
915
888 class _KeyboardServiceShowParams extends bindings.Struct { 916 class _KeyboardServiceShowParams extends bindings.Struct {
889 static const List<bindings.StructDataHeader> kVersions = const [ 917 static const List<bindings.StructDataHeader> kVersions = const [
890 const bindings.StructDataHeader(24, 0) 918 const bindings.StructDataHeader(24, 0)
891 ]; 919 ];
892 Object client = null; 920 Object client = null;
893 KeyboardType type = null; 921 KeyboardType type = null;
894 922
895 _KeyboardServiceShowParams() : super(kVersions.last.size); 923 _KeyboardServiceShowParams() : super(kVersions.last.size);
896 924
897 static _KeyboardServiceShowParams deserialize(bindings.Message message) { 925 static _KeyboardServiceShowParams deserialize(bindings.Message message) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 "type: $type" ")"; 984 "type: $type" ")";
957 } 985 }
958 986
959 Map toJson() { 987 Map toJson() {
960 throw new bindings.MojoCodecError( 988 throw new bindings.MojoCodecError(
961 'Object containing handles cannot be encoded to JSON.'); 989 'Object containing handles cannot be encoded to JSON.');
962 } 990 }
963 } 991 }
964 992
965 993
994
995
966 class _KeyboardServiceShowByRequestParams extends bindings.Struct { 996 class _KeyboardServiceShowByRequestParams extends bindings.Struct {
967 static const List<bindings.StructDataHeader> kVersions = const [ 997 static const List<bindings.StructDataHeader> kVersions = const [
968 const bindings.StructDataHeader(8, 0) 998 const bindings.StructDataHeader(8, 0)
969 ]; 999 ];
970 1000
971 _KeyboardServiceShowByRequestParams() : super(kVersions.last.size); 1001 _KeyboardServiceShowByRequestParams() : super(kVersions.last.size);
972 1002
973 static _KeyboardServiceShowByRequestParams deserialize(bindings.Message messag e) { 1003 static _KeyboardServiceShowByRequestParams deserialize(bindings.Message messag e) {
974 var decoder = new bindings.Decoder(message); 1004 var decoder = new bindings.Decoder(message);
975 var result = decode(decoder); 1005 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 return "_KeyboardServiceShowByRequestParams("")"; 1044 return "_KeyboardServiceShowByRequestParams("")";
1015 } 1045 }
1016 1046
1017 Map toJson() { 1047 Map toJson() {
1018 Map map = new Map(); 1048 Map map = new Map();
1019 return map; 1049 return map;
1020 } 1050 }
1021 } 1051 }
1022 1052
1023 1053
1054
1055
1024 class _KeyboardServiceHideParams extends bindings.Struct { 1056 class _KeyboardServiceHideParams extends bindings.Struct {
1025 static const List<bindings.StructDataHeader> kVersions = const [ 1057 static const List<bindings.StructDataHeader> kVersions = const [
1026 const bindings.StructDataHeader(8, 0) 1058 const bindings.StructDataHeader(8, 0)
1027 ]; 1059 ];
1028 1060
1029 _KeyboardServiceHideParams() : super(kVersions.last.size); 1061 _KeyboardServiceHideParams() : super(kVersions.last.size);
1030 1062
1031 static _KeyboardServiceHideParams deserialize(bindings.Message message) { 1063 static _KeyboardServiceHideParams deserialize(bindings.Message message) {
1032 var decoder = new bindings.Decoder(message); 1064 var decoder = new bindings.Decoder(message);
1033 var result = decode(decoder); 1065 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 return "_KeyboardServiceHideParams("")"; 1104 return "_KeyboardServiceHideParams("")";
1073 } 1105 }
1074 1106
1075 Map toJson() { 1107 Map toJson() {
1076 Map map = new Map(); 1108 Map map = new Map();
1077 return map; 1109 return map;
1078 } 1110 }
1079 } 1111 }
1080 1112
1081 1113
1114
1115
1082 class _KeyboardServiceSetTextParams extends bindings.Struct { 1116 class _KeyboardServiceSetTextParams extends bindings.Struct {
1083 static const List<bindings.StructDataHeader> kVersions = const [ 1117 static const List<bindings.StructDataHeader> kVersions = const [
1084 const bindings.StructDataHeader(16, 0) 1118 const bindings.StructDataHeader(16, 0)
1085 ]; 1119 ];
1086 String text = null; 1120 String text = null;
1087 1121
1088 _KeyboardServiceSetTextParams() : super(kVersions.last.size); 1122 _KeyboardServiceSetTextParams() : super(kVersions.last.size);
1089 1123
1090 static _KeyboardServiceSetTextParams deserialize(bindings.Message message) { 1124 static _KeyboardServiceSetTextParams deserialize(bindings.Message message) {
1091 var decoder = new bindings.Decoder(message); 1125 var decoder = new bindings.Decoder(message);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 } 1173 }
1140 1174
1141 Map toJson() { 1175 Map toJson() {
1142 Map map = new Map(); 1176 Map map = new Map();
1143 map["text"] = text; 1177 map["text"] = text;
1144 return map; 1178 return map;
1145 } 1179 }
1146 } 1180 }
1147 1181
1148 1182
1183
1184
1149 class _KeyboardServiceSetSelectionParams extends bindings.Struct { 1185 class _KeyboardServiceSetSelectionParams extends bindings.Struct {
1150 static const List<bindings.StructDataHeader> kVersions = const [ 1186 static const List<bindings.StructDataHeader> kVersions = const [
1151 const bindings.StructDataHeader(16, 0) 1187 const bindings.StructDataHeader(16, 0)
1152 ]; 1188 ];
1153 int start = 0; 1189 int start = 0;
1154 int end = 0; 1190 int end = 0;
1155 1191
1156 _KeyboardServiceSetSelectionParams() : super(kVersions.last.size); 1192 _KeyboardServiceSetSelectionParams() : super(kVersions.last.size);
1157 1193
1158 static _KeyboardServiceSetSelectionParams deserialize(bindings.Message message ) { 1194 static _KeyboardServiceSetSelectionParams deserialize(bindings.Message message ) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 1251
1216 Map toJson() { 1252 Map toJson() {
1217 Map map = new Map(); 1253 Map map = new Map();
1218 map["start"] = start; 1254 map["start"] = start;
1219 map["end"] = end; 1255 map["end"] = end;
1220 return map; 1256 return map;
1221 } 1257 }
1222 } 1258 }
1223 1259
1224 1260
1261
1262
1225 class _KeyboardServiceFactoryCreateKeyboardServiceParams extends bindings.Struct { 1263 class _KeyboardServiceFactoryCreateKeyboardServiceParams extends bindings.Struct {
1226 static const List<bindings.StructDataHeader> kVersions = const [ 1264 static const List<bindings.StructDataHeader> kVersions = const [
1227 const bindings.StructDataHeader(16, 0) 1265 const bindings.StructDataHeader(16, 0)
1228 ]; 1266 ];
1229 Object keyEventDispatcher = null; 1267 Object keyEventDispatcher = null;
1230 Object serviceRequest = null; 1268 Object serviceRequest = null;
1231 1269
1232 _KeyboardServiceFactoryCreateKeyboardServiceParams() : super(kVersions.last.si ze); 1270 _KeyboardServiceFactoryCreateKeyboardServiceParams() : super(kVersions.last.si ze);
1233 1271
1234 static _KeyboardServiceFactoryCreateKeyboardServiceParams deserialize(bindings .Message message) { 1272 static _KeyboardServiceFactoryCreateKeyboardServiceParams deserialize(bindings .Message message) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 "keyEventDispatcher: $keyEventDispatcher" ", " 1326 "keyEventDispatcher: $keyEventDispatcher" ", "
1289 "serviceRequest: $serviceRequest" ")"; 1327 "serviceRequest: $serviceRequest" ")";
1290 } 1328 }
1291 1329
1292 Map toJson() { 1330 Map toJson() {
1293 throw new bindings.MojoCodecError( 1331 throw new bindings.MojoCodecError(
1294 'Object containing handles cannot be encoded to JSON.'); 1332 'Object containing handles cannot be encoded to JSON.');
1295 } 1333 }
1296 } 1334 }
1297 1335
1336
1337
1338
1298 const int _KeyboardClient_commitCompletionName = 0; 1339 const int _KeyboardClient_commitCompletionName = 0;
1299 const int _KeyboardClient_commitCorrectionName = 1; 1340 const int _KeyboardClient_commitCorrectionName = 1;
1300 const int _KeyboardClient_commitTextName = 2; 1341 const int _KeyboardClient_commitTextName = 2;
1301 const int _KeyboardClient_deleteSurroundingTextName = 3; 1342 const int _KeyboardClient_deleteSurroundingTextName = 3;
1302 const int _KeyboardClient_setComposingRegionName = 4; 1343 const int _KeyboardClient_setComposingRegionName = 4;
1303 const int _KeyboardClient_setComposingTextName = 5; 1344 const int _KeyboardClient_setComposingTextName = 5;
1304 const int _KeyboardClient_setSelectionName = 6; 1345 const int _KeyboardClient_setSelectionName = 6;
1305 const int _KeyboardClient_submitName = 7; 1346 const int _KeyboardClient_submitName = 7;
1306 1347
1348
1349
1350 class _KeyboardClientServiceDescription implements service_describer.ServiceDesc ription {
1351 dynamic getTopLevelInterface([Function responseFactory = null]) => null;
1352
1353 dynamic getTypeDefinition(String typeKey, [Function responseFactory = null]) = >
1354 null;
1355
1356 dynamic getAllTypeDefinitions([Function responseFactory = null]) => null;
1357 }
1358
1307 abstract class KeyboardClient { 1359 abstract class KeyboardClient {
1308 static const String serviceName = null; 1360 static const String serviceName = null;
1309 void commitCompletion(CompletionData completion); 1361 void commitCompletion(CompletionData completion);
1310 void commitCorrection(CorrectionData correction); 1362 void commitCorrection(CorrectionData correction);
1311 void commitText(String text, int newCursorPosition); 1363 void commitText(String text, int newCursorPosition);
1312 void deleteSurroundingText(int beforeLength, int afterLength); 1364 void deleteSurroundingText(int beforeLength, int afterLength);
1313 void setComposingRegion(int start, int end); 1365 void setComposingRegion(int start, int end);
1314 void setComposingText(String text, int newCursorPosition); 1366 void setComposingText(String text, int newCursorPosition);
1315 void setSelection(int start, int end); 1367 void setSelection(int start, int end);
1316 void submit(SubmitAction action); 1368 void submit(SubmitAction action);
1317 } 1369 }
1318 1370
1319 1371
1320 class _KeyboardClientProxyImpl extends bindings.Proxy { 1372 class _KeyboardClientProxyImpl extends bindings.Proxy {
1321 _KeyboardClientProxyImpl.fromEndpoint( 1373 _KeyboardClientProxyImpl.fromEndpoint(
1322 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 1374 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
1323 1375
1324 _KeyboardClientProxyImpl.fromHandle(core.MojoHandle handle) : 1376 _KeyboardClientProxyImpl.fromHandle(core.MojoHandle handle) :
1325 super.fromHandle(handle); 1377 super.fromHandle(handle);
1326 1378
1327 _KeyboardClientProxyImpl.unbound() : super.unbound(); 1379 _KeyboardClientProxyImpl.unbound() : super.unbound();
1328 1380
1329 static _KeyboardClientProxyImpl newFromEndpoint( 1381 static _KeyboardClientProxyImpl newFromEndpoint(
1330 core.MojoMessagePipeEndpoint endpoint) { 1382 core.MojoMessagePipeEndpoint endpoint) {
1331 assert(endpoint.setDescription("For _KeyboardClientProxyImpl")); 1383 assert(endpoint.setDescription("For _KeyboardClientProxyImpl"));
1332 return new _KeyboardClientProxyImpl.fromEndpoint(endpoint); 1384 return new _KeyboardClientProxyImpl.fromEndpoint(endpoint);
1333 } 1385 }
1334 1386
1387 service_describer.ServiceDescription get serviceDescription =>
1388 new _KeyboardClientServiceDescription();
1389
1335 void handleResponse(bindings.ServiceMessage message) { 1390 void handleResponse(bindings.ServiceMessage message) {
1336 switch (message.header.type) { 1391 switch (message.header.type) {
1337 default: 1392 default:
1338 proxyError("Unexpected message type: ${message.header.type}"); 1393 proxyError("Unexpected message type: ${message.header.type}");
1339 close(immediate: true); 1394 close(immediate: true);
1340 break; 1395 break;
1341 } 1396 }
1342 } 1397 }
1343 1398
1344 String toString() { 1399 String toString() {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 assert(_impl == null); 1626 assert(_impl == null);
1572 _impl = d; 1627 _impl = d;
1573 } 1628 }
1574 1629
1575 String toString() { 1630 String toString() {
1576 var superString = super.toString(); 1631 var superString = super.toString();
1577 return "KeyboardClientStub($superString)"; 1632 return "KeyboardClientStub($superString)";
1578 } 1633 }
1579 1634
1580 int get version => 0; 1635 int get version => 0;
1636
1637 service_describer.ServiceDescription get serviceDescription =>
1638 new _KeyboardClientServiceDescription();
1581 } 1639 }
1582 1640
1583 const int _KeyboardService_showName = 0; 1641 const int _KeyboardService_showName = 0;
1584 const int _KeyboardService_showByRequestName = 1; 1642 const int _KeyboardService_showByRequestName = 1;
1585 const int _KeyboardService_hideName = 2; 1643 const int _KeyboardService_hideName = 2;
1586 const int _KeyboardService_setTextName = 3; 1644 const int _KeyboardService_setTextName = 3;
1587 const int _KeyboardService_setSelectionName = 4; 1645 const int _KeyboardService_setSelectionName = 4;
1588 1646
1647
1648
1649 class _KeyboardServiceServiceDescription implements service_describer.ServiceDes cription {
1650 dynamic getTopLevelInterface([Function responseFactory = null]) => null;
1651
1652 dynamic getTypeDefinition(String typeKey, [Function responseFactory = null]) = >
1653 null;
1654
1655 dynamic getAllTypeDefinitions([Function responseFactory = null]) => null;
1656 }
1657
1589 abstract class KeyboardService { 1658 abstract class KeyboardService {
1590 static const String serviceName = "keyboard::KeyboardService"; 1659 static const String serviceName = "keyboard::KeyboardService";
1591 void show(Object client, KeyboardType type); 1660 void show(Object client, KeyboardType type);
1592 void showByRequest(); 1661 void showByRequest();
1593 void hide(); 1662 void hide();
1594 void setText(String text); 1663 void setText(String text);
1595 void setSelection(int start, int end); 1664 void setSelection(int start, int end);
1596 } 1665 }
1597 1666
1598 1667
1599 class _KeyboardServiceProxyImpl extends bindings.Proxy { 1668 class _KeyboardServiceProxyImpl extends bindings.Proxy {
1600 _KeyboardServiceProxyImpl.fromEndpoint( 1669 _KeyboardServiceProxyImpl.fromEndpoint(
1601 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 1670 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
1602 1671
1603 _KeyboardServiceProxyImpl.fromHandle(core.MojoHandle handle) : 1672 _KeyboardServiceProxyImpl.fromHandle(core.MojoHandle handle) :
1604 super.fromHandle(handle); 1673 super.fromHandle(handle);
1605 1674
1606 _KeyboardServiceProxyImpl.unbound() : super.unbound(); 1675 _KeyboardServiceProxyImpl.unbound() : super.unbound();
1607 1676
1608 static _KeyboardServiceProxyImpl newFromEndpoint( 1677 static _KeyboardServiceProxyImpl newFromEndpoint(
1609 core.MojoMessagePipeEndpoint endpoint) { 1678 core.MojoMessagePipeEndpoint endpoint) {
1610 assert(endpoint.setDescription("For _KeyboardServiceProxyImpl")); 1679 assert(endpoint.setDescription("For _KeyboardServiceProxyImpl"));
1611 return new _KeyboardServiceProxyImpl.fromEndpoint(endpoint); 1680 return new _KeyboardServiceProxyImpl.fromEndpoint(endpoint);
1612 } 1681 }
1613 1682
1683 service_describer.ServiceDescription get serviceDescription =>
1684 new _KeyboardServiceServiceDescription();
1685
1614 void handleResponse(bindings.ServiceMessage message) { 1686 void handleResponse(bindings.ServiceMessage message) {
1615 switch (message.header.type) { 1687 switch (message.header.type) {
1616 default: 1688 default:
1617 proxyError("Unexpected message type: ${message.header.type}"); 1689 proxyError("Unexpected message type: ${message.header.type}");
1618 close(immediate: true); 1690 close(immediate: true);
1619 break; 1691 break;
1620 } 1692 }
1621 } 1693 }
1622 1694
1623 String toString() { 1695 String toString() {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 assert(_impl == null); 1875 assert(_impl == null);
1804 _impl = d; 1876 _impl = d;
1805 } 1877 }
1806 1878
1807 String toString() { 1879 String toString() {
1808 var superString = super.toString(); 1880 var superString = super.toString();
1809 return "KeyboardServiceStub($superString)"; 1881 return "KeyboardServiceStub($superString)";
1810 } 1882 }
1811 1883
1812 int get version => 0; 1884 int get version => 0;
1885
1886 service_describer.ServiceDescription get serviceDescription =>
1887 new _KeyboardServiceServiceDescription();
1813 } 1888 }
1814 1889
1815 const int _KeyboardServiceFactory_createKeyboardServiceName = 0; 1890 const int _KeyboardServiceFactory_createKeyboardServiceName = 0;
1816 1891
1892
1893
1894 class _KeyboardServiceFactoryServiceDescription implements service_describer.Ser viceDescription {
1895 dynamic getTopLevelInterface([Function responseFactory = null]) => null;
1896
1897 dynamic getTypeDefinition(String typeKey, [Function responseFactory = null]) = >
1898 null;
1899
1900 dynamic getAllTypeDefinitions([Function responseFactory = null]) => null;
1901 }
1902
1817 abstract class KeyboardServiceFactory { 1903 abstract class KeyboardServiceFactory {
1818 static const String serviceName = "keyboard::KeyboardServiceFactory"; 1904 static const String serviceName = "keyboard::KeyboardServiceFactory";
1819 void createKeyboardService(Object keyEventDispatcher, Object serviceRequest); 1905 void createKeyboardService(Object keyEventDispatcher, Object serviceRequest);
1820 } 1906 }
1821 1907
1822 1908
1823 class _KeyboardServiceFactoryProxyImpl extends bindings.Proxy { 1909 class _KeyboardServiceFactoryProxyImpl extends bindings.Proxy {
1824 _KeyboardServiceFactoryProxyImpl.fromEndpoint( 1910 _KeyboardServiceFactoryProxyImpl.fromEndpoint(
1825 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 1911 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
1826 1912
1827 _KeyboardServiceFactoryProxyImpl.fromHandle(core.MojoHandle handle) : 1913 _KeyboardServiceFactoryProxyImpl.fromHandle(core.MojoHandle handle) :
1828 super.fromHandle(handle); 1914 super.fromHandle(handle);
1829 1915
1830 _KeyboardServiceFactoryProxyImpl.unbound() : super.unbound(); 1916 _KeyboardServiceFactoryProxyImpl.unbound() : super.unbound();
1831 1917
1832 static _KeyboardServiceFactoryProxyImpl newFromEndpoint( 1918 static _KeyboardServiceFactoryProxyImpl newFromEndpoint(
1833 core.MojoMessagePipeEndpoint endpoint) { 1919 core.MojoMessagePipeEndpoint endpoint) {
1834 assert(endpoint.setDescription("For _KeyboardServiceFactoryProxyImpl")); 1920 assert(endpoint.setDescription("For _KeyboardServiceFactoryProxyImpl"));
1835 return new _KeyboardServiceFactoryProxyImpl.fromEndpoint(endpoint); 1921 return new _KeyboardServiceFactoryProxyImpl.fromEndpoint(endpoint);
1836 } 1922 }
1837 1923
1924 service_describer.ServiceDescription get serviceDescription =>
1925 new _KeyboardServiceFactoryServiceDescription();
1926
1838 void handleResponse(bindings.ServiceMessage message) { 1927 void handleResponse(bindings.ServiceMessage message) {
1839 switch (message.header.type) { 1928 switch (message.header.type) {
1840 default: 1929 default:
1841 proxyError("Unexpected message type: ${message.header.type}"); 1930 proxyError("Unexpected message type: ${message.header.type}");
1842 close(immediate: true); 1931 close(immediate: true);
1843 break; 1932 break;
1844 } 1933 }
1845 } 1934 }
1846 1935
1847 String toString() { 1936 String toString() {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 assert(_impl == null); 2061 assert(_impl == null);
1973 _impl = d; 2062 _impl = d;
1974 } 2063 }
1975 2064
1976 String toString() { 2065 String toString() {
1977 var superString = super.toString(); 2066 var superString = super.toString();
1978 return "KeyboardServiceFactoryStub($superString)"; 2067 return "KeyboardServiceFactoryStub($superString)";
1979 } 2068 }
1980 2069
1981 int get version => 0; 2070 int get version => 0;
2071
2072 service_describer.ServiceDescription get serviceDescription =>
2073 new _KeyboardServiceFactoryServiceDescription();
1982 } 2074 }
1983 2075
1984 2076
2077
2078
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698