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

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

Issue 2006093002: Dart: Futures -> Callbacks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Cleanup Created 4 years, 6 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 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 import 'package:mojo_services/mojo/native_viewport_event_dispatcher.mojom.dart' as native_viewport_event_dispatcher_mojom; 10 import 'package:mojo_services/mojo/native_viewport_event_dispatcher.mojom.dart' as native_viewport_event_dispatcher_mojom;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 static const List<bindings.StructDataHeader> kVersions = const [ 126 static const List<bindings.StructDataHeader> kVersions = const [
127 const bindings.StructDataHeader(40, 0) 127 const bindings.StructDataHeader(40, 0)
128 ]; 128 ];
129 int id = 0; 129 int id = 0;
130 int position = 0; 130 int position = 0;
131 String text = null; 131 String text = null;
132 String label = null; 132 String label = null;
133 133
134 CompletionData() : super(kVersions.last.size); 134 CompletionData() : super(kVersions.last.size);
135 135
136 CompletionData.init(
137 int this.id,
138 int this.position,
139 String this.text,
140 String this.label
141 ) : super(kVersions.last.size);
142
136 static CompletionData deserialize(bindings.Message message) { 143 static CompletionData deserialize(bindings.Message message) {
137 var decoder = new bindings.Decoder(message); 144 var decoder = new bindings.Decoder(message);
138 var result = decode(decoder); 145 var result = decode(decoder);
139 if (decoder.excessHandles != null) { 146 if (decoder.excessHandles != null) {
140 decoder.excessHandles.forEach((h) => h.close()); 147 decoder.excessHandles.forEach((h) => h.close());
141 } 148 }
142 return result; 149 return result;
143 } 150 }
144 151
145 static CompletionData decode(bindings.Decoder decoder0) { 152 static CompletionData decode(bindings.Decoder decoder0) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 class CorrectionData extends bindings.Struct { 246 class CorrectionData extends bindings.Struct {
240 static const List<bindings.StructDataHeader> kVersions = const [ 247 static const List<bindings.StructDataHeader> kVersions = const [
241 const bindings.StructDataHeader(32, 0) 248 const bindings.StructDataHeader(32, 0)
242 ]; 249 ];
243 int offset = 0; 250 int offset = 0;
244 String oldText = null; 251 String oldText = null;
245 String newText = null; 252 String newText = null;
246 253
247 CorrectionData() : super(kVersions.last.size); 254 CorrectionData() : super(kVersions.last.size);
248 255
256 CorrectionData.init(
257 int this.offset,
258 String this.oldText,
259 String this.newText
260 ) : super(kVersions.last.size);
261
249 static CorrectionData deserialize(bindings.Message message) { 262 static CorrectionData deserialize(bindings.Message message) {
250 var decoder = new bindings.Decoder(message); 263 var decoder = new bindings.Decoder(message);
251 var result = decode(decoder); 264 var result = decode(decoder);
252 if (decoder.excessHandles != null) { 265 if (decoder.excessHandles != null) {
253 decoder.excessHandles.forEach((h) => h.close()); 266 decoder.excessHandles.forEach((h) => h.close());
254 } 267 }
255 return result; 268 return result;
256 } 269 }
257 270
258 static CorrectionData decode(bindings.Decoder decoder0) { 271 static CorrectionData decode(bindings.Decoder decoder0) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 350
338 351
339 class _KeyboardClientCommitCompletionParams extends bindings.Struct { 352 class _KeyboardClientCommitCompletionParams extends bindings.Struct {
340 static const List<bindings.StructDataHeader> kVersions = const [ 353 static const List<bindings.StructDataHeader> kVersions = const [
341 const bindings.StructDataHeader(16, 0) 354 const bindings.StructDataHeader(16, 0)
342 ]; 355 ];
343 CompletionData completion = null; 356 CompletionData completion = null;
344 357
345 _KeyboardClientCommitCompletionParams() : super(kVersions.last.size); 358 _KeyboardClientCommitCompletionParams() : super(kVersions.last.size);
346 359
360 _KeyboardClientCommitCompletionParams.init(
361 CompletionData this.completion
362 ) : super(kVersions.last.size);
363
347 static _KeyboardClientCommitCompletionParams deserialize(bindings.Message mess age) { 364 static _KeyboardClientCommitCompletionParams deserialize(bindings.Message mess age) {
348 var decoder = new bindings.Decoder(message); 365 var decoder = new bindings.Decoder(message);
349 var result = decode(decoder); 366 var result = decode(decoder);
350 if (decoder.excessHandles != null) { 367 if (decoder.excessHandles != null) {
351 decoder.excessHandles.forEach((h) => h.close()); 368 decoder.excessHandles.forEach((h) => h.close());
352 } 369 }
353 return result; 370 return result;
354 } 371 }
355 372
356 static _KeyboardClientCommitCompletionParams decode(bindings.Decoder decoder0) { 373 static _KeyboardClientCommitCompletionParams decode(bindings.Decoder decoder0) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 427
411 428
412 class _KeyboardClientCommitCorrectionParams extends bindings.Struct { 429 class _KeyboardClientCommitCorrectionParams extends bindings.Struct {
413 static const List<bindings.StructDataHeader> kVersions = const [ 430 static const List<bindings.StructDataHeader> kVersions = const [
414 const bindings.StructDataHeader(16, 0) 431 const bindings.StructDataHeader(16, 0)
415 ]; 432 ];
416 CorrectionData correction = null; 433 CorrectionData correction = null;
417 434
418 _KeyboardClientCommitCorrectionParams() : super(kVersions.last.size); 435 _KeyboardClientCommitCorrectionParams() : super(kVersions.last.size);
419 436
437 _KeyboardClientCommitCorrectionParams.init(
438 CorrectionData this.correction
439 ) : super(kVersions.last.size);
440
420 static _KeyboardClientCommitCorrectionParams deserialize(bindings.Message mess age) { 441 static _KeyboardClientCommitCorrectionParams deserialize(bindings.Message mess age) {
421 var decoder = new bindings.Decoder(message); 442 var decoder = new bindings.Decoder(message);
422 var result = decode(decoder); 443 var result = decode(decoder);
423 if (decoder.excessHandles != null) { 444 if (decoder.excessHandles != null) {
424 decoder.excessHandles.forEach((h) => h.close()); 445 decoder.excessHandles.forEach((h) => h.close());
425 } 446 }
426 return result; 447 return result;
427 } 448 }
428 449
429 static _KeyboardClientCommitCorrectionParams decode(bindings.Decoder decoder0) { 450 static _KeyboardClientCommitCorrectionParams decode(bindings.Decoder decoder0) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 505
485 class _KeyboardClientCommitTextParams extends bindings.Struct { 506 class _KeyboardClientCommitTextParams extends bindings.Struct {
486 static const List<bindings.StructDataHeader> kVersions = const [ 507 static const List<bindings.StructDataHeader> kVersions = const [
487 const bindings.StructDataHeader(24, 0) 508 const bindings.StructDataHeader(24, 0)
488 ]; 509 ];
489 String text = null; 510 String text = null;
490 int newCursorPosition = 0; 511 int newCursorPosition = 0;
491 512
492 _KeyboardClientCommitTextParams() : super(kVersions.last.size); 513 _KeyboardClientCommitTextParams() : super(kVersions.last.size);
493 514
515 _KeyboardClientCommitTextParams.init(
516 String this.text,
517 int this.newCursorPosition
518 ) : super(kVersions.last.size);
519
494 static _KeyboardClientCommitTextParams deserialize(bindings.Message message) { 520 static _KeyboardClientCommitTextParams deserialize(bindings.Message message) {
495 var decoder = new bindings.Decoder(message); 521 var decoder = new bindings.Decoder(message);
496 var result = decode(decoder); 522 var result = decode(decoder);
497 if (decoder.excessHandles != null) { 523 if (decoder.excessHandles != null) {
498 decoder.excessHandles.forEach((h) => h.close()); 524 decoder.excessHandles.forEach((h) => h.close());
499 } 525 }
500 return result; 526 return result;
501 } 527 }
502 528
503 static _KeyboardClientCommitTextParams decode(bindings.Decoder decoder0) { 529 static _KeyboardClientCommitTextParams decode(bindings.Decoder decoder0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 596
571 class _KeyboardClientDeleteSurroundingTextParams extends bindings.Struct { 597 class _KeyboardClientDeleteSurroundingTextParams extends bindings.Struct {
572 static const List<bindings.StructDataHeader> kVersions = const [ 598 static const List<bindings.StructDataHeader> kVersions = const [
573 const bindings.StructDataHeader(16, 0) 599 const bindings.StructDataHeader(16, 0)
574 ]; 600 ];
575 int beforeLength = 0; 601 int beforeLength = 0;
576 int afterLength = 0; 602 int afterLength = 0;
577 603
578 _KeyboardClientDeleteSurroundingTextParams() : super(kVersions.last.size); 604 _KeyboardClientDeleteSurroundingTextParams() : super(kVersions.last.size);
579 605
606 _KeyboardClientDeleteSurroundingTextParams.init(
607 int this.beforeLength,
608 int this.afterLength
609 ) : super(kVersions.last.size);
610
580 static _KeyboardClientDeleteSurroundingTextParams deserialize(bindings.Message message) { 611 static _KeyboardClientDeleteSurroundingTextParams deserialize(bindings.Message message) {
581 var decoder = new bindings.Decoder(message); 612 var decoder = new bindings.Decoder(message);
582 var result = decode(decoder); 613 var result = decode(decoder);
583 if (decoder.excessHandles != null) { 614 if (decoder.excessHandles != null) {
584 decoder.excessHandles.forEach((h) => h.close()); 615 decoder.excessHandles.forEach((h) => h.close());
585 } 616 }
586 return result; 617 return result;
587 } 618 }
588 619
589 static _KeyboardClientDeleteSurroundingTextParams decode(bindings.Decoder deco der0) { 620 static _KeyboardClientDeleteSurroundingTextParams decode(bindings.Decoder deco der0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 687
657 class _KeyboardClientSetComposingRegionParams extends bindings.Struct { 688 class _KeyboardClientSetComposingRegionParams extends bindings.Struct {
658 static const List<bindings.StructDataHeader> kVersions = const [ 689 static const List<bindings.StructDataHeader> kVersions = const [
659 const bindings.StructDataHeader(16, 0) 690 const bindings.StructDataHeader(16, 0)
660 ]; 691 ];
661 int start = 0; 692 int start = 0;
662 int end = 0; 693 int end = 0;
663 694
664 _KeyboardClientSetComposingRegionParams() : super(kVersions.last.size); 695 _KeyboardClientSetComposingRegionParams() : super(kVersions.last.size);
665 696
697 _KeyboardClientSetComposingRegionParams.init(
698 int this.start,
699 int this.end
700 ) : super(kVersions.last.size);
701
666 static _KeyboardClientSetComposingRegionParams deserialize(bindings.Message me ssage) { 702 static _KeyboardClientSetComposingRegionParams deserialize(bindings.Message me ssage) {
667 var decoder = new bindings.Decoder(message); 703 var decoder = new bindings.Decoder(message);
668 var result = decode(decoder); 704 var result = decode(decoder);
669 if (decoder.excessHandles != null) { 705 if (decoder.excessHandles != null) {
670 decoder.excessHandles.forEach((h) => h.close()); 706 decoder.excessHandles.forEach((h) => h.close());
671 } 707 }
672 return result; 708 return result;
673 } 709 }
674 710
675 static _KeyboardClientSetComposingRegionParams decode(bindings.Decoder decoder 0) { 711 static _KeyboardClientSetComposingRegionParams decode(bindings.Decoder decoder 0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 778
743 class _KeyboardClientSetComposingTextParams extends bindings.Struct { 779 class _KeyboardClientSetComposingTextParams extends bindings.Struct {
744 static const List<bindings.StructDataHeader> kVersions = const [ 780 static const List<bindings.StructDataHeader> kVersions = const [
745 const bindings.StructDataHeader(24, 0) 781 const bindings.StructDataHeader(24, 0)
746 ]; 782 ];
747 String text = null; 783 String text = null;
748 int newCursorPosition = 0; 784 int newCursorPosition = 0;
749 785
750 _KeyboardClientSetComposingTextParams() : super(kVersions.last.size); 786 _KeyboardClientSetComposingTextParams() : super(kVersions.last.size);
751 787
788 _KeyboardClientSetComposingTextParams.init(
789 String this.text,
790 int this.newCursorPosition
791 ) : super(kVersions.last.size);
792
752 static _KeyboardClientSetComposingTextParams deserialize(bindings.Message mess age) { 793 static _KeyboardClientSetComposingTextParams deserialize(bindings.Message mess age) {
753 var decoder = new bindings.Decoder(message); 794 var decoder = new bindings.Decoder(message);
754 var result = decode(decoder); 795 var result = decode(decoder);
755 if (decoder.excessHandles != null) { 796 if (decoder.excessHandles != null) {
756 decoder.excessHandles.forEach((h) => h.close()); 797 decoder.excessHandles.forEach((h) => h.close());
757 } 798 }
758 return result; 799 return result;
759 } 800 }
760 801
761 static _KeyboardClientSetComposingTextParams decode(bindings.Decoder decoder0) { 802 static _KeyboardClientSetComposingTextParams decode(bindings.Decoder decoder0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 869
829 class _KeyboardClientSetSelectionParams extends bindings.Struct { 870 class _KeyboardClientSetSelectionParams extends bindings.Struct {
830 static const List<bindings.StructDataHeader> kVersions = const [ 871 static const List<bindings.StructDataHeader> kVersions = const [
831 const bindings.StructDataHeader(16, 0) 872 const bindings.StructDataHeader(16, 0)
832 ]; 873 ];
833 int start = 0; 874 int start = 0;
834 int end = 0; 875 int end = 0;
835 876
836 _KeyboardClientSetSelectionParams() : super(kVersions.last.size); 877 _KeyboardClientSetSelectionParams() : super(kVersions.last.size);
837 878
879 _KeyboardClientSetSelectionParams.init(
880 int this.start,
881 int this.end
882 ) : super(kVersions.last.size);
883
838 static _KeyboardClientSetSelectionParams deserialize(bindings.Message message) { 884 static _KeyboardClientSetSelectionParams deserialize(bindings.Message message) {
839 var decoder = new bindings.Decoder(message); 885 var decoder = new bindings.Decoder(message);
840 var result = decode(decoder); 886 var result = decode(decoder);
841 if (decoder.excessHandles != null) { 887 if (decoder.excessHandles != null) {
842 decoder.excessHandles.forEach((h) => h.close()); 888 decoder.excessHandles.forEach((h) => h.close());
843 } 889 }
844 return result; 890 return result;
845 } 891 }
846 892
847 static _KeyboardClientSetSelectionParams decode(bindings.Decoder decoder0) { 893 static _KeyboardClientSetSelectionParams decode(bindings.Decoder decoder0) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 959
914 960
915 class _KeyboardClientSubmitParams extends bindings.Struct { 961 class _KeyboardClientSubmitParams extends bindings.Struct {
916 static const List<bindings.StructDataHeader> kVersions = const [ 962 static const List<bindings.StructDataHeader> kVersions = const [
917 const bindings.StructDataHeader(16, 0) 963 const bindings.StructDataHeader(16, 0)
918 ]; 964 ];
919 SubmitAction action = null; 965 SubmitAction action = null;
920 966
921 _KeyboardClientSubmitParams() : super(kVersions.last.size); 967 _KeyboardClientSubmitParams() : super(kVersions.last.size);
922 968
969 _KeyboardClientSubmitParams.init(
970 SubmitAction this.action
971 ) : super(kVersions.last.size);
972
923 static _KeyboardClientSubmitParams deserialize(bindings.Message message) { 973 static _KeyboardClientSubmitParams deserialize(bindings.Message message) {
924 var decoder = new bindings.Decoder(message); 974 var decoder = new bindings.Decoder(message);
925 var result = decode(decoder); 975 var result = decode(decoder);
926 if (decoder.excessHandles != null) { 976 if (decoder.excessHandles != null) {
927 decoder.excessHandles.forEach((h) => h.close()); 977 decoder.excessHandles.forEach((h) => h.close());
928 } 978 }
929 return result; 979 return result;
930 } 980 }
931 981
932 static _KeyboardClientSubmitParams decode(bindings.Decoder decoder0) { 982 static _KeyboardClientSubmitParams decode(bindings.Decoder decoder0) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 1040
991 class _KeyboardServiceShowParams extends bindings.Struct { 1041 class _KeyboardServiceShowParams extends bindings.Struct {
992 static const List<bindings.StructDataHeader> kVersions = const [ 1042 static const List<bindings.StructDataHeader> kVersions = const [
993 const bindings.StructDataHeader(24, 0) 1043 const bindings.StructDataHeader(24, 0)
994 ]; 1044 ];
995 KeyboardClientInterface client = null; 1045 KeyboardClientInterface client = null;
996 KeyboardType type = null; 1046 KeyboardType type = null;
997 1047
998 _KeyboardServiceShowParams() : super(kVersions.last.size); 1048 _KeyboardServiceShowParams() : super(kVersions.last.size);
999 1049
1050 _KeyboardServiceShowParams.init(
1051 KeyboardClientInterface this.client,
1052 KeyboardType this.type
1053 ) : super(kVersions.last.size);
1054
1000 static _KeyboardServiceShowParams deserialize(bindings.Message message) { 1055 static _KeyboardServiceShowParams deserialize(bindings.Message message) {
1001 var decoder = new bindings.Decoder(message); 1056 var decoder = new bindings.Decoder(message);
1002 var result = decode(decoder); 1057 var result = decode(decoder);
1003 if (decoder.excessHandles != null) { 1058 if (decoder.excessHandles != null) {
1004 decoder.excessHandles.forEach((h) => h.close()); 1059 decoder.excessHandles.forEach((h) => h.close());
1005 } 1060 }
1006 return result; 1061 return result;
1007 } 1062 }
1008 1063
1009 static _KeyboardServiceShowParams decode(bindings.Decoder decoder0) { 1064 static _KeyboardServiceShowParams decode(bindings.Decoder decoder0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 } 1131 }
1077 1132
1078 1133
1079 class _KeyboardServiceShowByRequestParams extends bindings.Struct { 1134 class _KeyboardServiceShowByRequestParams extends bindings.Struct {
1080 static const List<bindings.StructDataHeader> kVersions = const [ 1135 static const List<bindings.StructDataHeader> kVersions = const [
1081 const bindings.StructDataHeader(8, 0) 1136 const bindings.StructDataHeader(8, 0)
1082 ]; 1137 ];
1083 1138
1084 _KeyboardServiceShowByRequestParams() : super(kVersions.last.size); 1139 _KeyboardServiceShowByRequestParams() : super(kVersions.last.size);
1085 1140
1141 _KeyboardServiceShowByRequestParams.init(
1142 ) : super(kVersions.last.size);
1143
1086 static _KeyboardServiceShowByRequestParams deserialize(bindings.Message messag e) { 1144 static _KeyboardServiceShowByRequestParams deserialize(bindings.Message messag e) {
1087 var decoder = new bindings.Decoder(message); 1145 var decoder = new bindings.Decoder(message);
1088 var result = decode(decoder); 1146 var result = decode(decoder);
1089 if (decoder.excessHandles != null) { 1147 if (decoder.excessHandles != null) {
1090 decoder.excessHandles.forEach((h) => h.close()); 1148 decoder.excessHandles.forEach((h) => h.close());
1091 } 1149 }
1092 return result; 1150 return result;
1093 } 1151 }
1094 1152
1095 static _KeyboardServiceShowByRequestParams decode(bindings.Decoder decoder0) { 1153 static _KeyboardServiceShowByRequestParams decode(bindings.Decoder decoder0) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 } 1192 }
1135 1193
1136 1194
1137 class _KeyboardServiceHideParams extends bindings.Struct { 1195 class _KeyboardServiceHideParams extends bindings.Struct {
1138 static const List<bindings.StructDataHeader> kVersions = const [ 1196 static const List<bindings.StructDataHeader> kVersions = const [
1139 const bindings.StructDataHeader(8, 0) 1197 const bindings.StructDataHeader(8, 0)
1140 ]; 1198 ];
1141 1199
1142 _KeyboardServiceHideParams() : super(kVersions.last.size); 1200 _KeyboardServiceHideParams() : super(kVersions.last.size);
1143 1201
1202 _KeyboardServiceHideParams.init(
1203 ) : super(kVersions.last.size);
1204
1144 static _KeyboardServiceHideParams deserialize(bindings.Message message) { 1205 static _KeyboardServiceHideParams deserialize(bindings.Message message) {
1145 var decoder = new bindings.Decoder(message); 1206 var decoder = new bindings.Decoder(message);
1146 var result = decode(decoder); 1207 var result = decode(decoder);
1147 if (decoder.excessHandles != null) { 1208 if (decoder.excessHandles != null) {
1148 decoder.excessHandles.forEach((h) => h.close()); 1209 decoder.excessHandles.forEach((h) => h.close());
1149 } 1210 }
1150 return result; 1211 return result;
1151 } 1212 }
1152 1213
1153 static _KeyboardServiceHideParams decode(bindings.Decoder decoder0) { 1214 static _KeyboardServiceHideParams decode(bindings.Decoder decoder0) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 1254
1194 1255
1195 class _KeyboardServiceSetTextParams extends bindings.Struct { 1256 class _KeyboardServiceSetTextParams extends bindings.Struct {
1196 static const List<bindings.StructDataHeader> kVersions = const [ 1257 static const List<bindings.StructDataHeader> kVersions = const [
1197 const bindings.StructDataHeader(16, 0) 1258 const bindings.StructDataHeader(16, 0)
1198 ]; 1259 ];
1199 String text = null; 1260 String text = null;
1200 1261
1201 _KeyboardServiceSetTextParams() : super(kVersions.last.size); 1262 _KeyboardServiceSetTextParams() : super(kVersions.last.size);
1202 1263
1264 _KeyboardServiceSetTextParams.init(
1265 String this.text
1266 ) : super(kVersions.last.size);
1267
1203 static _KeyboardServiceSetTextParams deserialize(bindings.Message message) { 1268 static _KeyboardServiceSetTextParams deserialize(bindings.Message message) {
1204 var decoder = new bindings.Decoder(message); 1269 var decoder = new bindings.Decoder(message);
1205 var result = decode(decoder); 1270 var result = decode(decoder);
1206 if (decoder.excessHandles != null) { 1271 if (decoder.excessHandles != null) {
1207 decoder.excessHandles.forEach((h) => h.close()); 1272 decoder.excessHandles.forEach((h) => h.close());
1208 } 1273 }
1209 return result; 1274 return result;
1210 } 1275 }
1211 1276
1212 static _KeyboardServiceSetTextParams decode(bindings.Decoder decoder0) { 1277 static _KeyboardServiceSetTextParams decode(bindings.Decoder decoder0) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 1331
1267 class _KeyboardServiceSetSelectionParams extends bindings.Struct { 1332 class _KeyboardServiceSetSelectionParams extends bindings.Struct {
1268 static const List<bindings.StructDataHeader> kVersions = const [ 1333 static const List<bindings.StructDataHeader> kVersions = const [
1269 const bindings.StructDataHeader(16, 0) 1334 const bindings.StructDataHeader(16, 0)
1270 ]; 1335 ];
1271 int start = 0; 1336 int start = 0;
1272 int end = 0; 1337 int end = 0;
1273 1338
1274 _KeyboardServiceSetSelectionParams() : super(kVersions.last.size); 1339 _KeyboardServiceSetSelectionParams() : super(kVersions.last.size);
1275 1340
1341 _KeyboardServiceSetSelectionParams.init(
1342 int this.start,
1343 int this.end
1344 ) : super(kVersions.last.size);
1345
1276 static _KeyboardServiceSetSelectionParams deserialize(bindings.Message message ) { 1346 static _KeyboardServiceSetSelectionParams deserialize(bindings.Message message ) {
1277 var decoder = new bindings.Decoder(message); 1347 var decoder = new bindings.Decoder(message);
1278 var result = decode(decoder); 1348 var result = decode(decoder);
1279 if (decoder.excessHandles != null) { 1349 if (decoder.excessHandles != null) {
1280 decoder.excessHandles.forEach((h) => h.close()); 1350 decoder.excessHandles.forEach((h) => h.close());
1281 } 1351 }
1282 return result; 1352 return result;
1283 } 1353 }
1284 1354
1285 static _KeyboardServiceSetSelectionParams decode(bindings.Decoder decoder0) { 1355 static _KeyboardServiceSetSelectionParams decode(bindings.Decoder decoder0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 1422
1353 class _KeyboardServiceFactoryCreateKeyboardServiceParams extends bindings.Struct { 1423 class _KeyboardServiceFactoryCreateKeyboardServiceParams extends bindings.Struct {
1354 static const List<bindings.StructDataHeader> kVersions = const [ 1424 static const List<bindings.StructDataHeader> kVersions = const [
1355 const bindings.StructDataHeader(16, 0) 1425 const bindings.StructDataHeader(16, 0)
1356 ]; 1426 ];
1357 native_viewport_event_dispatcher_mojom.NativeViewportEventDispatcherInterfaceR equest keyEventDispatcher = null; 1427 native_viewport_event_dispatcher_mojom.NativeViewportEventDispatcherInterfaceR equest keyEventDispatcher = null;
1358 KeyboardServiceInterfaceRequest serviceRequest = null; 1428 KeyboardServiceInterfaceRequest serviceRequest = null;
1359 1429
1360 _KeyboardServiceFactoryCreateKeyboardServiceParams() : super(kVersions.last.si ze); 1430 _KeyboardServiceFactoryCreateKeyboardServiceParams() : super(kVersions.last.si ze);
1361 1431
1432 _KeyboardServiceFactoryCreateKeyboardServiceParams.init(
1433 native_viewport_event_dispatcher_mojom.NativeViewportEventDispatcherInterfac eRequest this.keyEventDispatcher,
1434 KeyboardServiceInterfaceRequest this.serviceRequest
1435 ) : super(kVersions.last.size);
1436
1362 static _KeyboardServiceFactoryCreateKeyboardServiceParams deserialize(bindings .Message message) { 1437 static _KeyboardServiceFactoryCreateKeyboardServiceParams deserialize(bindings .Message message) {
1363 var decoder = new bindings.Decoder(message); 1438 var decoder = new bindings.Decoder(message);
1364 var result = decode(decoder); 1439 var result = decode(decoder);
1365 if (decoder.excessHandles != null) { 1440 if (decoder.excessHandles != null) {
1366 decoder.excessHandles.forEach((h) => h.close()); 1441 decoder.excessHandles.forEach((h) => h.close());
1367 } 1442 }
1368 return result; 1443 return result;
1369 } 1444 }
1370 1445
1371 static _KeyboardServiceFactoryCreateKeyboardServiceParams decode(bindings.Deco der decoder0) { 1446 static _KeyboardServiceFactoryCreateKeyboardServiceParams decode(bindings.Deco der decoder0) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 const int _keyboardClientMethodCommitCompletionName = 0; 1511 const int _keyboardClientMethodCommitCompletionName = 0;
1437 const int _keyboardClientMethodCommitCorrectionName = 1; 1512 const int _keyboardClientMethodCommitCorrectionName = 1;
1438 const int _keyboardClientMethodCommitTextName = 2; 1513 const int _keyboardClientMethodCommitTextName = 2;
1439 const int _keyboardClientMethodDeleteSurroundingTextName = 3; 1514 const int _keyboardClientMethodDeleteSurroundingTextName = 3;
1440 const int _keyboardClientMethodSetComposingRegionName = 4; 1515 const int _keyboardClientMethodSetComposingRegionName = 4;
1441 const int _keyboardClientMethodSetComposingTextName = 5; 1516 const int _keyboardClientMethodSetComposingTextName = 5;
1442 const int _keyboardClientMethodSetSelectionName = 6; 1517 const int _keyboardClientMethodSetSelectionName = 6;
1443 const int _keyboardClientMethodSubmitName = 7; 1518 const int _keyboardClientMethodSubmitName = 7;
1444 1519
1445 class _KeyboardClientServiceDescription implements service_describer.ServiceDesc ription { 1520 class _KeyboardClientServiceDescription implements service_describer.ServiceDesc ription {
1446 dynamic getTopLevelInterface([Function responseFactory]) => 1521 void getTopLevelInterface(Function responder) {
1447 responseFactory(null); 1522 responder(null);
1523 }
1448 1524
1449 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 1525 void getTypeDefinition(String typeKey, Function responder) {
1450 responseFactory(null); 1526 responder(null);
1527 }
1451 1528
1452 dynamic getAllTypeDefinitions([Function responseFactory]) => 1529 void getAllTypeDefinitions(Function responder) {
1453 responseFactory(null); 1530 responder(null);
1531 }
1454 } 1532 }
1455 1533
1456 abstract class KeyboardClient { 1534 abstract class KeyboardClient {
1457 static const String serviceName = null; 1535 static const String serviceName = null;
1458 1536
1459 static service_describer.ServiceDescription _cachedServiceDescription; 1537 static service_describer.ServiceDescription _cachedServiceDescription;
1460 static service_describer.ServiceDescription get serviceDescription { 1538 static service_describer.ServiceDescription get serviceDescription {
1461 if (_cachedServiceDescription == null) { 1539 if (_cachedServiceDescription == null) {
1462 _cachedServiceDescription = new _KeyboardClientServiceDescription(); 1540 _cachedServiceDescription = new _KeyboardClientServiceDescription();
1463 } 1541 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 : super.fromHandle(handle, autoBegin: impl != null) { 1781 : super.fromHandle(handle, autoBegin: impl != null) {
1704 _impl = impl; 1782 _impl = impl;
1705 } 1783 }
1706 1784
1707 _KeyboardClientStubControl.unbound([this._impl]) : super.unbound(); 1785 _KeyboardClientStubControl.unbound([this._impl]) : super.unbound();
1708 1786
1709 String get serviceName => KeyboardClient.serviceName; 1787 String get serviceName => KeyboardClient.serviceName;
1710 1788
1711 1789
1712 1790
1713 dynamic handleMessage(bindings.ServiceMessage message) { 1791 void handleMessage(bindings.ServiceMessage message) {
1714 if (bindings.ControlMessageHandler.isControlMessage(message)) { 1792 if (bindings.ControlMessageHandler.isControlMessage(message)) {
1715 return bindings.ControlMessageHandler.handleMessage(this, 1793 bindings.ControlMessageHandler.handleMessage(
1716 0, 1794 this, 0, message);
1717 message); 1795 return;
1718 } 1796 }
1719 if (_impl == null) { 1797 if (_impl == null) {
1720 throw new core.MojoApiError("$this has no implementation set"); 1798 throw new core.MojoApiError("$this has no implementation set");
1721 } 1799 }
1722 switch (message.header.type) { 1800 switch (message.header.type) {
1723 case _keyboardClientMethodCommitCompletionName: 1801 case _keyboardClientMethodCommitCompletionName:
1724 var params = _KeyboardClientCommitCompletionParams.deserialize( 1802 var params = _KeyboardClientCommitCompletionParams.deserialize(
1725 message.payload); 1803 message.payload);
1726 _impl.commitCompletion(params.completion); 1804 _impl.commitCompletion(params.completion);
1727 break; 1805 break;
(...skipping 29 matching lines...) Expand all
1757 break; 1835 break;
1758 case _keyboardClientMethodSubmitName: 1836 case _keyboardClientMethodSubmitName:
1759 var params = _KeyboardClientSubmitParams.deserialize( 1837 var params = _KeyboardClientSubmitParams.deserialize(
1760 message.payload); 1838 message.payload);
1761 _impl.submit(params.action); 1839 _impl.submit(params.action);
1762 break; 1840 break;
1763 default: 1841 default:
1764 throw new bindings.MojoCodecError("Unexpected message name"); 1842 throw new bindings.MojoCodecError("Unexpected message name");
1765 break; 1843 break;
1766 } 1844 }
1767 return null;
1768 } 1845 }
1769 1846
1770 KeyboardClient get impl => _impl; 1847 KeyboardClient get impl => _impl;
1771 set impl(KeyboardClient d) { 1848 set impl(KeyboardClient d) {
1772 if (d == null) { 1849 if (d == null) {
1773 throw new core.MojoApiError("$this: Cannot set a null implementation"); 1850 throw new core.MojoApiError("$this: Cannot set a null implementation");
1774 } 1851 }
1775 if (isBound && (_impl == null)) { 1852 if (isBound && (_impl == null)) {
1776 beginHandlingEvents(); 1853 beginHandlingEvents();
1777 } 1854 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 } 1921 }
1845 } 1922 }
1846 1923
1847 const int _keyboardServiceMethodShowName = 0; 1924 const int _keyboardServiceMethodShowName = 0;
1848 const int _keyboardServiceMethodShowByRequestName = 1; 1925 const int _keyboardServiceMethodShowByRequestName = 1;
1849 const int _keyboardServiceMethodHideName = 2; 1926 const int _keyboardServiceMethodHideName = 2;
1850 const int _keyboardServiceMethodSetTextName = 3; 1927 const int _keyboardServiceMethodSetTextName = 3;
1851 const int _keyboardServiceMethodSetSelectionName = 4; 1928 const int _keyboardServiceMethodSetSelectionName = 4;
1852 1929
1853 class _KeyboardServiceServiceDescription implements service_describer.ServiceDes cription { 1930 class _KeyboardServiceServiceDescription implements service_describer.ServiceDes cription {
1854 dynamic getTopLevelInterface([Function responseFactory]) => 1931 void getTopLevelInterface(Function responder) {
1855 responseFactory(null); 1932 responder(null);
1933 }
1856 1934
1857 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 1935 void getTypeDefinition(String typeKey, Function responder) {
1858 responseFactory(null); 1936 responder(null);
1937 }
1859 1938
1860 dynamic getAllTypeDefinitions([Function responseFactory]) => 1939 void getAllTypeDefinitions(Function responder) {
1861 responseFactory(null); 1940 responder(null);
1941 }
1862 } 1942 }
1863 1943
1864 abstract class KeyboardService { 1944 abstract class KeyboardService {
1865 static const String serviceName = "keyboard::KeyboardService"; 1945 static const String serviceName = "keyboard::KeyboardService";
1866 1946
1867 static service_describer.ServiceDescription _cachedServiceDescription; 1947 static service_describer.ServiceDescription _cachedServiceDescription;
1868 static service_describer.ServiceDescription get serviceDescription { 1948 static service_describer.ServiceDescription get serviceDescription {
1869 if (_cachedServiceDescription == null) { 1949 if (_cachedServiceDescription == null) {
1870 _cachedServiceDescription = new _KeyboardServiceServiceDescription(); 1950 _cachedServiceDescription = new _KeyboardServiceServiceDescription();
1871 } 1951 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 : super.fromHandle(handle, autoBegin: impl != null) { 2141 : super.fromHandle(handle, autoBegin: impl != null) {
2062 _impl = impl; 2142 _impl = impl;
2063 } 2143 }
2064 2144
2065 _KeyboardServiceStubControl.unbound([this._impl]) : super.unbound(); 2145 _KeyboardServiceStubControl.unbound([this._impl]) : super.unbound();
2066 2146
2067 String get serviceName => KeyboardService.serviceName; 2147 String get serviceName => KeyboardService.serviceName;
2068 2148
2069 2149
2070 2150
2071 dynamic handleMessage(bindings.ServiceMessage message) { 2151 void handleMessage(bindings.ServiceMessage message) {
2072 if (bindings.ControlMessageHandler.isControlMessage(message)) { 2152 if (bindings.ControlMessageHandler.isControlMessage(message)) {
2073 return bindings.ControlMessageHandler.handleMessage(this, 2153 bindings.ControlMessageHandler.handleMessage(
2074 0, 2154 this, 0, message);
2075 message); 2155 return;
2076 } 2156 }
2077 if (_impl == null) { 2157 if (_impl == null) {
2078 throw new core.MojoApiError("$this has no implementation set"); 2158 throw new core.MojoApiError("$this has no implementation set");
2079 } 2159 }
2080 switch (message.header.type) { 2160 switch (message.header.type) {
2081 case _keyboardServiceMethodShowName: 2161 case _keyboardServiceMethodShowName:
2082 var params = _KeyboardServiceShowParams.deserialize( 2162 var params = _KeyboardServiceShowParams.deserialize(
2083 message.payload); 2163 message.payload);
2084 _impl.show(params.client, params.type); 2164 _impl.show(params.client, params.type);
2085 break; 2165 break;
(...skipping 10 matching lines...) Expand all
2096 break; 2176 break;
2097 case _keyboardServiceMethodSetSelectionName: 2177 case _keyboardServiceMethodSetSelectionName:
2098 var params = _KeyboardServiceSetSelectionParams.deserialize( 2178 var params = _KeyboardServiceSetSelectionParams.deserialize(
2099 message.payload); 2179 message.payload);
2100 _impl.setSelection(params.start, params.end); 2180 _impl.setSelection(params.start, params.end);
2101 break; 2181 break;
2102 default: 2182 default:
2103 throw new bindings.MojoCodecError("Unexpected message name"); 2183 throw new bindings.MojoCodecError("Unexpected message name");
2104 break; 2184 break;
2105 } 2185 }
2106 return null;
2107 } 2186 }
2108 2187
2109 KeyboardService get impl => _impl; 2188 KeyboardService get impl => _impl;
2110 set impl(KeyboardService d) { 2189 set impl(KeyboardService d) {
2111 if (d == null) { 2190 if (d == null) {
2112 throw new core.MojoApiError("$this: Cannot set a null implementation"); 2191 throw new core.MojoApiError("$this: Cannot set a null implementation");
2113 } 2192 }
2114 if (isBound && (_impl == null)) { 2193 if (isBound && (_impl == null)) {
2115 beginHandlingEvents(); 2194 beginHandlingEvents();
2116 } 2195 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 return impl.setText(text); 2249 return impl.setText(text);
2171 } 2250 }
2172 void setSelection(int start, int end) { 2251 void setSelection(int start, int end) {
2173 return impl.setSelection(start, end); 2252 return impl.setSelection(start, end);
2174 } 2253 }
2175 } 2254 }
2176 2255
2177 const int _keyboardServiceFactoryMethodCreateKeyboardServiceName = 0; 2256 const int _keyboardServiceFactoryMethodCreateKeyboardServiceName = 0;
2178 2257
2179 class _KeyboardServiceFactoryServiceDescription implements service_describer.Ser viceDescription { 2258 class _KeyboardServiceFactoryServiceDescription implements service_describer.Ser viceDescription {
2180 dynamic getTopLevelInterface([Function responseFactory]) => 2259 void getTopLevelInterface(Function responder) {
2181 responseFactory(null); 2260 responder(null);
2261 }
2182 2262
2183 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 2263 void getTypeDefinition(String typeKey, Function responder) {
2184 responseFactory(null); 2264 responder(null);
2265 }
2185 2266
2186 dynamic getAllTypeDefinitions([Function responseFactory]) => 2267 void getAllTypeDefinitions(Function responder) {
2187 responseFactory(null); 2268 responder(null);
2269 }
2188 } 2270 }
2189 2271
2190 abstract class KeyboardServiceFactory { 2272 abstract class KeyboardServiceFactory {
2191 static const String serviceName = "keyboard::KeyboardServiceFactory"; 2273 static const String serviceName = "keyboard::KeyboardServiceFactory";
2192 2274
2193 static service_describer.ServiceDescription _cachedServiceDescription; 2275 static service_describer.ServiceDescription _cachedServiceDescription;
2194 static service_describer.ServiceDescription get serviceDescription { 2276 static service_describer.ServiceDescription get serviceDescription {
2195 if (_cachedServiceDescription == null) { 2277 if (_cachedServiceDescription == null) {
2196 _cachedServiceDescription = new _KeyboardServiceFactoryServiceDescription( ); 2278 _cachedServiceDescription = new _KeyboardServiceFactoryServiceDescription( );
2197 } 2279 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 : super.fromHandle(handle, autoBegin: impl != null) { 2410 : super.fromHandle(handle, autoBegin: impl != null) {
2329 _impl = impl; 2411 _impl = impl;
2330 } 2412 }
2331 2413
2332 _KeyboardServiceFactoryStubControl.unbound([this._impl]) : super.unbound(); 2414 _KeyboardServiceFactoryStubControl.unbound([this._impl]) : super.unbound();
2333 2415
2334 String get serviceName => KeyboardServiceFactory.serviceName; 2416 String get serviceName => KeyboardServiceFactory.serviceName;
2335 2417
2336 2418
2337 2419
2338 dynamic handleMessage(bindings.ServiceMessage message) { 2420 void handleMessage(bindings.ServiceMessage message) {
2339 if (bindings.ControlMessageHandler.isControlMessage(message)) { 2421 if (bindings.ControlMessageHandler.isControlMessage(message)) {
2340 return bindings.ControlMessageHandler.handleMessage(this, 2422 bindings.ControlMessageHandler.handleMessage(
2341 0, 2423 this, 0, message);
2342 message); 2424 return;
2343 } 2425 }
2344 if (_impl == null) { 2426 if (_impl == null) {
2345 throw new core.MojoApiError("$this has no implementation set"); 2427 throw new core.MojoApiError("$this has no implementation set");
2346 } 2428 }
2347 switch (message.header.type) { 2429 switch (message.header.type) {
2348 case _keyboardServiceFactoryMethodCreateKeyboardServiceName: 2430 case _keyboardServiceFactoryMethodCreateKeyboardServiceName:
2349 var params = _KeyboardServiceFactoryCreateKeyboardServiceParams.deserial ize( 2431 var params = _KeyboardServiceFactoryCreateKeyboardServiceParams.deserial ize(
2350 message.payload); 2432 message.payload);
2351 _impl.createKeyboardService(params.keyEventDispatcher, params.serviceReq uest); 2433 _impl.createKeyboardService(params.keyEventDispatcher, params.serviceReq uest);
2352 break; 2434 break;
2353 default: 2435 default:
2354 throw new bindings.MojoCodecError("Unexpected message name"); 2436 throw new bindings.MojoCodecError("Unexpected message name");
2355 break; 2437 break;
2356 } 2438 }
2357 return null;
2358 } 2439 }
2359 2440
2360 KeyboardServiceFactory get impl => _impl; 2441 KeyboardServiceFactory get impl => _impl;
2361 set impl(KeyboardServiceFactory d) { 2442 set impl(KeyboardServiceFactory d) {
2362 if (d == null) { 2443 if (d == null) {
2363 throw new core.MojoApiError("$this: Cannot set a null implementation"); 2444 throw new core.MojoApiError("$this: Cannot set a null implementation");
2364 } 2445 }
2365 if (isBound && (_impl == null)) { 2446 if (isBound && (_impl == null)) {
2366 beginHandlingEvents(); 2447 beginHandlingEvents();
2367 } 2448 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2408 } 2489 }
2409 2490
2410 2491
2411 void createKeyboardService(native_viewport_event_dispatcher_mojom.NativeViewpo rtEventDispatcherInterfaceRequest keyEventDispatcher, KeyboardServiceInterfaceRe quest serviceRequest) { 2492 void createKeyboardService(native_viewport_event_dispatcher_mojom.NativeViewpo rtEventDispatcherInterfaceRequest keyEventDispatcher, KeyboardServiceInterfaceRe quest serviceRequest) {
2412 return impl.createKeyboardService(keyEventDispatcher, serviceRequest); 2493 return impl.createKeyboardService(keyEventDispatcher, serviceRequest);
2413 } 2494 }
2414 } 2495 }
2415 2496
2416 2497
2417 2498
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698