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 prediction_mojom; | 5 library prediction_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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 Map toJson() { | 90 Map toJson() { |
91 Map map = new Map(); | 91 Map map = new Map(); |
92 map["word"] = word; | 92 map["word"] = word; |
93 map["isBeginningOfSentence"] = isBeginningOfSentence; | 93 map["isBeginningOfSentence"] = isBeginningOfSentence; |
94 return map; | 94 return map; |
95 } | 95 } |
96 } | 96 } |
97 | 97 |
98 | 98 |
99 | |
100 | |
101 class PredictionInfo extends bindings.Struct { | 99 class PredictionInfo extends bindings.Struct { |
102 static const List<bindings.StructDataHeader> kVersions = const [ | 100 static const List<bindings.StructDataHeader> kVersions = const [ |
103 const bindings.StructDataHeader(24, 0) | 101 const bindings.StructDataHeader(24, 0) |
104 ]; | 102 ]; |
105 List<PrevWordInfo> previousWords = null; | 103 List<PrevWordInfo> previousWords = null; |
106 String currentWord = null; | 104 String currentWord = null; |
107 | 105 |
108 PredictionInfo() : super(kVersions.last.size); | 106 PredictionInfo() : super(kVersions.last.size); |
109 | 107 |
110 static PredictionInfo deserialize(bindings.Message message) { | 108 static PredictionInfo deserialize(bindings.Message message) { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 191 |
194 Map toJson() { | 192 Map toJson() { |
195 Map map = new Map(); | 193 Map map = new Map(); |
196 map["previousWords"] = previousWords; | 194 map["previousWords"] = previousWords; |
197 map["currentWord"] = currentWord; | 195 map["currentWord"] = currentWord; |
198 return map; | 196 return map; |
199 } | 197 } |
200 } | 198 } |
201 | 199 |
202 | 200 |
203 | |
204 | |
205 class _PredictionServiceGetPredictionListParams extends bindings.Struct { | 201 class _PredictionServiceGetPredictionListParams extends bindings.Struct { |
206 static const List<bindings.StructDataHeader> kVersions = const [ | 202 static const List<bindings.StructDataHeader> kVersions = const [ |
207 const bindings.StructDataHeader(16, 0) | 203 const bindings.StructDataHeader(16, 0) |
208 ]; | 204 ]; |
209 PredictionInfo predictionInfo = null; | 205 PredictionInfo predictionInfo = null; |
210 | 206 |
211 _PredictionServiceGetPredictionListParams() : super(kVersions.last.size); | 207 _PredictionServiceGetPredictionListParams() : super(kVersions.last.size); |
212 | 208 |
213 static _PredictionServiceGetPredictionListParams deserialize(bindings.Message
message) { | 209 static _PredictionServiceGetPredictionListParams deserialize(bindings.Message
message) { |
214 var decoder = new bindings.Decoder(message); | 210 var decoder = new bindings.Decoder(message); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 } | 264 } |
269 | 265 |
270 Map toJson() { | 266 Map toJson() { |
271 Map map = new Map(); | 267 Map map = new Map(); |
272 map["predictionInfo"] = predictionInfo; | 268 map["predictionInfo"] = predictionInfo; |
273 return map; | 269 return map; |
274 } | 270 } |
275 } | 271 } |
276 | 272 |
277 | 273 |
278 | |
279 | |
280 class PredictionServiceGetPredictionListResponseParams extends bindings.Struct { | 274 class PredictionServiceGetPredictionListResponseParams extends bindings.Struct { |
281 static const List<bindings.StructDataHeader> kVersions = const [ | 275 static const List<bindings.StructDataHeader> kVersions = const [ |
282 const bindings.StructDataHeader(16, 0) | 276 const bindings.StructDataHeader(16, 0) |
283 ]; | 277 ]; |
284 List<String> predictionList = null; | 278 List<String> predictionList = null; |
285 | 279 |
286 PredictionServiceGetPredictionListResponseParams() : super(kVersions.last.size
); | 280 PredictionServiceGetPredictionListResponseParams() : super(kVersions.last.size
); |
287 | 281 |
288 static PredictionServiceGetPredictionListResponseParams deserialize(bindings.M
essage message) { | 282 static PredictionServiceGetPredictionListResponseParams deserialize(bindings.M
essage message) { |
289 var decoder = new bindings.Decoder(message); | 283 var decoder = new bindings.Decoder(message); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 "predictionList: $predictionList" ")"; | 352 "predictionList: $predictionList" ")"; |
359 } | 353 } |
360 | 354 |
361 Map toJson() { | 355 Map toJson() { |
362 Map map = new Map(); | 356 Map map = new Map(); |
363 map["predictionList"] = predictionList; | 357 map["predictionList"] = predictionList; |
364 return map; | 358 return map; |
365 } | 359 } |
366 } | 360 } |
367 | 361 |
368 | |
369 | |
370 | |
371 const int _PredictionService_getPredictionListName = 0; | 362 const int _PredictionService_getPredictionListName = 0; |
372 | 363 |
373 | |
374 | |
375 class _PredictionServiceServiceDescription implements service_describer.ServiceD
escription { | 364 class _PredictionServiceServiceDescription implements service_describer.ServiceD
escription { |
376 dynamic getTopLevelInterface([Function responseFactory]) => | 365 dynamic getTopLevelInterface([Function responseFactory]) => |
377 responseFactory(null); | 366 responseFactory(null); |
378 | 367 |
379 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 368 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
380 responseFactory(null); | 369 responseFactory(null); |
381 | 370 |
382 dynamic getAllTypeDefinitions([Function responseFactory]) => | 371 dynamic getAllTypeDefinitions([Function responseFactory]) => |
383 responseFactory(null); | 372 responseFactory(null); |
384 } | 373 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 static service_describer.ServiceDescription get serviceDescription { | 586 static service_describer.ServiceDescription get serviceDescription { |
598 if (_cachedServiceDescription == null) { | 587 if (_cachedServiceDescription == null) { |
599 _cachedServiceDescription = new _PredictionServiceServiceDescription(); | 588 _cachedServiceDescription = new _PredictionServiceServiceDescription(); |
600 } | 589 } |
601 return _cachedServiceDescription; | 590 return _cachedServiceDescription; |
602 } | 591 } |
603 } | 592 } |
604 | 593 |
605 | 594 |
606 | 595 |
OLD | NEW |