| 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 views_mojom; | 5 library views_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/mojom_types.mojom.dart' as mojom_types; |
| 12 import 'package:mojo/mojo/service_describer.mojom.dart' as service_describer; |
| 11 import 'package:mojo/mojo/service_provider.mojom.dart' as service_provider_mojom
; | 13 import 'package:mojo/mojo/service_provider.mojom.dart' as service_provider_mojom
; |
| 12 import 'package:mojo_services/mojo/ui/layouts.mojom.dart' as layouts_mojom; | 14 import 'package:mojo_services/mojo/ui/layouts.mojom.dart' as layouts_mojom; |
| 13 | 15 |
| 14 | 16 |
| 15 | 17 |
| 16 class ViewToken extends bindings.Struct { | 18 class ViewToken extends bindings.Struct { |
| 17 static const List<bindings.StructDataHeader> kVersions = const [ | 19 static const List<bindings.StructDataHeader> kVersions = const [ |
| 18 const bindings.StructDataHeader(16, 0) | 20 const bindings.StructDataHeader(16, 0) |
| 19 ]; | 21 ]; |
| 20 int value = 0; | 22 int value = 0; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 "value: $value" ")"; | 74 "value: $value" ")"; |
| 73 } | 75 } |
| 74 | 76 |
| 75 Map toJson() { | 77 Map toJson() { |
| 76 Map map = new Map(); | 78 Map map = new Map(); |
| 77 map["value"] = value; | 79 map["value"] = value; |
| 78 return map; | 80 return map; |
| 79 } | 81 } |
| 80 } | 82 } |
| 81 | 83 |
| 84 mojom_types.MojomStruct _views_ViewToken__() { |
| 85 return new mojom_types.MojomStruct() |
| 86 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewToken') |
| 87 ..fields = <mojom_types.StructField>[ |
| 88 new mojom_types.StructField() |
| 89 ..declData = (new mojom_types.DeclarationData()..shortName = 'Value') |
| 90 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UI
NT32), |
| 91 ]; |
| 92 } |
| 93 |
| 82 | 94 |
| 83 class ViewOnLayoutParams extends bindings.Struct { | 95 class ViewOnLayoutParams extends bindings.Struct { |
| 84 static const List<bindings.StructDataHeader> kVersions = const [ | 96 static const List<bindings.StructDataHeader> kVersions = const [ |
| 85 const bindings.StructDataHeader(24, 0) | 97 const bindings.StructDataHeader(24, 0) |
| 86 ]; | 98 ]; |
| 87 layouts_mojom.ViewLayoutParams layoutParams = null; | 99 layouts_mojom.ViewLayoutParams layoutParams = null; |
| 88 List<int> childrenNeedingLayout = null; | 100 List<int> childrenNeedingLayout = null; |
| 89 | 101 |
| 90 ViewOnLayoutParams() : super(kVersions.last.size); | 102 ViewOnLayoutParams() : super(kVersions.last.size); |
| 91 | 103 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 161 } |
| 150 | 162 |
| 151 Map toJson() { | 163 Map toJson() { |
| 152 Map map = new Map(); | 164 Map map = new Map(); |
| 153 map["layoutParams"] = layoutParams; | 165 map["layoutParams"] = layoutParams; |
| 154 map["childrenNeedingLayout"] = childrenNeedingLayout; | 166 map["childrenNeedingLayout"] = childrenNeedingLayout; |
| 155 return map; | 167 return map; |
| 156 } | 168 } |
| 157 } | 169 } |
| 158 | 170 |
| 171 mojom_types.MojomStruct _views_View_OnLayout_Params__() { |
| 172 return new mojom_types.MojomStruct() |
| 173 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewOnLayoutPa
rams') |
| 174 ..fields = <mojom_types.StructField>[ |
| 175 new mojom_types.StructField() |
| 176 ..declData = (new mojom_types.DeclarationData()..shortName = 'LayoutPara
ms') |
| 177 ..type = (new mojom_types.Type() |
| 178 ..typeReference = (new mojom_types.TypeReference() |
| 179 |
| 180 ..identifier = '_layouts_ViewLayoutParams__' |
| 181 ..typeKey = '_layouts_ViewLayoutParams__' |
| 182 )), |
| 183 |
| 184 new mojom_types.StructField() |
| 185 ..declData = (new mojom_types.DeclarationData()..shortName = 'ChildrenNe
edingLayout') |
| 186 ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType
() |
| 187 ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType
.UINT32))), |
| 188 ]; |
| 189 } |
| 190 |
| 159 | 191 |
| 160 class ViewOnLayoutResponseParams extends bindings.Struct { | 192 class ViewOnLayoutResponseParams extends bindings.Struct { |
| 161 static const List<bindings.StructDataHeader> kVersions = const [ | 193 static const List<bindings.StructDataHeader> kVersions = const [ |
| 162 const bindings.StructDataHeader(16, 0) | 194 const bindings.StructDataHeader(16, 0) |
| 163 ]; | 195 ]; |
| 164 layouts_mojom.ViewLayoutInfo info = null; | 196 layouts_mojom.ViewLayoutInfo info = null; |
| 165 | 197 |
| 166 ViewOnLayoutResponseParams() : super(kVersions.last.size); | 198 ViewOnLayoutResponseParams() : super(kVersions.last.size); |
| 167 | 199 |
| 168 static ViewOnLayoutResponseParams deserialize(bindings.Message message) { | 200 static ViewOnLayoutResponseParams deserialize(bindings.Message message) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 "info: $info" ")"; | 249 "info: $info" ")"; |
| 218 } | 250 } |
| 219 | 251 |
| 220 Map toJson() { | 252 Map toJson() { |
| 221 Map map = new Map(); | 253 Map map = new Map(); |
| 222 map["info"] = info; | 254 map["info"] = info; |
| 223 return map; | 255 return map; |
| 224 } | 256 } |
| 225 } | 257 } |
| 226 | 258 |
| 259 mojom_types.MojomStruct _views_View_OnLayout_ResponseParams__() { |
| 260 return new mojom_types.MojomStruct() |
| 261 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewOnLayoutRe
sponseParams') |
| 262 ..fields = <mojom_types.StructField>[ |
| 263 new mojom_types.StructField() |
| 264 ..declData = (new mojom_types.DeclarationData()..shortName = 'Info') |
| 265 ..type = (new mojom_types.Type() |
| 266 ..typeReference = (new mojom_types.TypeReference() |
| 267 |
| 268 ..identifier = '_layouts_ViewLayoutInfo__' |
| 269 ..typeKey = '_layouts_ViewLayoutInfo__' |
| 270 )), |
| 271 ]; |
| 272 } |
| 273 |
| 227 | 274 |
| 228 class ViewOnChildUnavailableParams extends bindings.Struct { | 275 class ViewOnChildUnavailableParams extends bindings.Struct { |
| 229 static const List<bindings.StructDataHeader> kVersions = const [ | 276 static const List<bindings.StructDataHeader> kVersions = const [ |
| 230 const bindings.StructDataHeader(16, 0) | 277 const bindings.StructDataHeader(16, 0) |
| 231 ]; | 278 ]; |
| 232 int childKey = 0; | 279 int childKey = 0; |
| 233 | 280 |
| 234 ViewOnChildUnavailableParams() : super(kVersions.last.size); | 281 ViewOnChildUnavailableParams() : super(kVersions.last.size); |
| 235 | 282 |
| 236 static ViewOnChildUnavailableParams deserialize(bindings.Message message) { | 283 static ViewOnChildUnavailableParams deserialize(bindings.Message message) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 "childKey: $childKey" ")"; | 331 "childKey: $childKey" ")"; |
| 285 } | 332 } |
| 286 | 333 |
| 287 Map toJson() { | 334 Map toJson() { |
| 288 Map map = new Map(); | 335 Map map = new Map(); |
| 289 map["childKey"] = childKey; | 336 map["childKey"] = childKey; |
| 290 return map; | 337 return map; |
| 291 } | 338 } |
| 292 } | 339 } |
| 293 | 340 |
| 341 mojom_types.MojomStruct _views_View_OnChildUnavailable_Params__() { |
| 342 return new mojom_types.MojomStruct() |
| 343 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewOnChildUna
vailableParams') |
| 344 ..fields = <mojom_types.StructField>[ |
| 345 new mojom_types.StructField() |
| 346 ..declData = (new mojom_types.DeclarationData()..shortName = 'ChildKey') |
| 347 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UI
NT32), |
| 348 ]; |
| 349 } |
| 350 |
| 294 | 351 |
| 295 class ViewOnChildUnavailableResponseParams extends bindings.Struct { | 352 class ViewOnChildUnavailableResponseParams extends bindings.Struct { |
| 296 static const List<bindings.StructDataHeader> kVersions = const [ | 353 static const List<bindings.StructDataHeader> kVersions = const [ |
| 297 const bindings.StructDataHeader(8, 0) | 354 const bindings.StructDataHeader(8, 0) |
| 298 ]; | 355 ]; |
| 299 | 356 |
| 300 ViewOnChildUnavailableResponseParams() : super(kVersions.last.size); | 357 ViewOnChildUnavailableResponseParams() : super(kVersions.last.size); |
| 301 | 358 |
| 302 static ViewOnChildUnavailableResponseParams deserialize(bindings.Message messa
ge) { | 359 static ViewOnChildUnavailableResponseParams deserialize(bindings.Message messa
ge) { |
| 303 var decoder = new bindings.Decoder(message); | 360 var decoder = new bindings.Decoder(message); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 String toString() { | 399 String toString() { |
| 343 return "ViewOnChildUnavailableResponseParams("")"; | 400 return "ViewOnChildUnavailableResponseParams("")"; |
| 344 } | 401 } |
| 345 | 402 |
| 346 Map toJson() { | 403 Map toJson() { |
| 347 Map map = new Map(); | 404 Map map = new Map(); |
| 348 return map; | 405 return map; |
| 349 } | 406 } |
| 350 } | 407 } |
| 351 | 408 |
| 409 mojom_types.MojomStruct _views_View_OnChildUnavailable_ResponseParams__() { |
| 410 return new mojom_types.MojomStruct() |
| 411 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewOnChildUna
vailableResponseParams') |
| 412 ..fields = <mojom_types.StructField>[]; |
| 413 } |
| 414 |
| 352 | 415 |
| 353 class ViewHostGetServiceProviderParams extends bindings.Struct { | 416 class ViewHostGetServiceProviderParams extends bindings.Struct { |
| 354 static const List<bindings.StructDataHeader> kVersions = const [ | 417 static const List<bindings.StructDataHeader> kVersions = const [ |
| 355 const bindings.StructDataHeader(16, 0) | 418 const bindings.StructDataHeader(16, 0) |
| 356 ]; | 419 ]; |
| 357 Object serviceProvider = null; | 420 Object serviceProvider = null; |
| 358 | 421 |
| 359 ViewHostGetServiceProviderParams() : super(kVersions.last.size); | 422 ViewHostGetServiceProviderParams() : super(kVersions.last.size); |
| 360 | 423 |
| 361 static ViewHostGetServiceProviderParams deserialize(bindings.Message message)
{ | 424 static ViewHostGetServiceProviderParams deserialize(bindings.Message message)
{ |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 return "ViewHostGetServiceProviderParams(" | 471 return "ViewHostGetServiceProviderParams(" |
| 409 "serviceProvider: $serviceProvider" ")"; | 472 "serviceProvider: $serviceProvider" ")"; |
| 410 } | 473 } |
| 411 | 474 |
| 412 Map toJson() { | 475 Map toJson() { |
| 413 throw new bindings.MojoCodecError( | 476 throw new bindings.MojoCodecError( |
| 414 'Object containing handles cannot be encoded to JSON.'); | 477 'Object containing handles cannot be encoded to JSON.'); |
| 415 } | 478 } |
| 416 } | 479 } |
| 417 | 480 |
| 481 mojom_types.MojomStruct _views_ViewHost_GetServiceProvider_Params__() { |
| 482 return new mojom_types.MojomStruct() |
| 483 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewHostGetSer
viceProviderParams') |
| 484 ..fields = <mojom_types.StructField>[ |
| 485 new mojom_types.StructField() |
| 486 ..declData = (new mojom_types.DeclarationData()..shortName = 'ServicePro
vider') |
| 487 ..type = (new mojom_types.Type() |
| 488 ..typeReference = (new mojom_types.TypeReference() |
| 489 |
| 490 ..isInterfaceRequest = true |
| 491 ..identifier = '_service_provider_ServiceProvider__' |
| 492 ..typeKey = '_service_provider_ServiceProvider__' |
| 493 )), |
| 494 ]; |
| 495 } |
| 496 |
| 418 | 497 |
| 419 class ViewHostRequestLayoutParams extends bindings.Struct { | 498 class ViewHostRequestLayoutParams extends bindings.Struct { |
| 420 static const List<bindings.StructDataHeader> kVersions = const [ | 499 static const List<bindings.StructDataHeader> kVersions = const [ |
| 421 const bindings.StructDataHeader(8, 0) | 500 const bindings.StructDataHeader(8, 0) |
| 422 ]; | 501 ]; |
| 423 | 502 |
| 424 ViewHostRequestLayoutParams() : super(kVersions.last.size); | 503 ViewHostRequestLayoutParams() : super(kVersions.last.size); |
| 425 | 504 |
| 426 static ViewHostRequestLayoutParams deserialize(bindings.Message message) { | 505 static ViewHostRequestLayoutParams deserialize(bindings.Message message) { |
| 427 var decoder = new bindings.Decoder(message); | 506 var decoder = new bindings.Decoder(message); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 String toString() { | 545 String toString() { |
| 467 return "ViewHostRequestLayoutParams("")"; | 546 return "ViewHostRequestLayoutParams("")"; |
| 468 } | 547 } |
| 469 | 548 |
| 470 Map toJson() { | 549 Map toJson() { |
| 471 Map map = new Map(); | 550 Map map = new Map(); |
| 472 return map; | 551 return map; |
| 473 } | 552 } |
| 474 } | 553 } |
| 475 | 554 |
| 555 mojom_types.MojomStruct _views_ViewHost_RequestLayout_Params__() { |
| 556 return new mojom_types.MojomStruct() |
| 557 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewHostReques
tLayoutParams') |
| 558 ..fields = <mojom_types.StructField>[]; |
| 559 } |
| 560 |
| 476 | 561 |
| 477 class ViewHostAddChildParams extends bindings.Struct { | 562 class ViewHostAddChildParams extends bindings.Struct { |
| 478 static const List<bindings.StructDataHeader> kVersions = const [ | 563 static const List<bindings.StructDataHeader> kVersions = const [ |
| 479 const bindings.StructDataHeader(24, 0) | 564 const bindings.StructDataHeader(24, 0) |
| 480 ]; | 565 ]; |
| 481 int childKey = 0; | 566 int childKey = 0; |
| 482 ViewToken childViewToken = null; | 567 ViewToken childViewToken = null; |
| 483 | 568 |
| 484 ViewHostAddChildParams() : super(kVersions.last.size); | 569 ViewHostAddChildParams() : super(kVersions.last.size); |
| 485 | 570 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } | 628 } |
| 544 | 629 |
| 545 Map toJson() { | 630 Map toJson() { |
| 546 Map map = new Map(); | 631 Map map = new Map(); |
| 547 map["childKey"] = childKey; | 632 map["childKey"] = childKey; |
| 548 map["childViewToken"] = childViewToken; | 633 map["childViewToken"] = childViewToken; |
| 549 return map; | 634 return map; |
| 550 } | 635 } |
| 551 } | 636 } |
| 552 | 637 |
| 638 mojom_types.MojomStruct _views_ViewHost_AddChild_Params__() { |
| 639 return new mojom_types.MojomStruct() |
| 640 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewHostAddChi
ldParams') |
| 641 ..fields = <mojom_types.StructField>[ |
| 642 new mojom_types.StructField() |
| 643 ..declData = (new mojom_types.DeclarationData()..shortName = 'ChildKey') |
| 644 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UI
NT32), |
| 645 |
| 646 new mojom_types.StructField() |
| 647 ..declData = (new mojom_types.DeclarationData()..shortName = 'ChildViewT
oken') |
| 648 ..type = (new mojom_types.Type() |
| 649 ..typeReference = (new mojom_types.TypeReference() |
| 650 |
| 651 ..identifier = '_views_ViewToken__' |
| 652 ..typeKey = '_views_ViewToken__' |
| 653 )), |
| 654 ]; |
| 655 } |
| 656 |
| 553 | 657 |
| 554 class ViewHostRemoveChildParams extends bindings.Struct { | 658 class ViewHostRemoveChildParams extends bindings.Struct { |
| 555 static const List<bindings.StructDataHeader> kVersions = const [ | 659 static const List<bindings.StructDataHeader> kVersions = const [ |
| 556 const bindings.StructDataHeader(16, 0) | 660 const bindings.StructDataHeader(16, 0) |
| 557 ]; | 661 ]; |
| 558 int childKey = 0; | 662 int childKey = 0; |
| 559 | 663 |
| 560 ViewHostRemoveChildParams() : super(kVersions.last.size); | 664 ViewHostRemoveChildParams() : super(kVersions.last.size); |
| 561 | 665 |
| 562 static ViewHostRemoveChildParams deserialize(bindings.Message message) { | 666 static ViewHostRemoveChildParams deserialize(bindings.Message message) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 "childKey: $childKey" ")"; | 714 "childKey: $childKey" ")"; |
| 611 } | 715 } |
| 612 | 716 |
| 613 Map toJson() { | 717 Map toJson() { |
| 614 Map map = new Map(); | 718 Map map = new Map(); |
| 615 map["childKey"] = childKey; | 719 map["childKey"] = childKey; |
| 616 return map; | 720 return map; |
| 617 } | 721 } |
| 618 } | 722 } |
| 619 | 723 |
| 724 mojom_types.MojomStruct _views_ViewHost_RemoveChild_Params__() { |
| 725 return new mojom_types.MojomStruct() |
| 726 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewHostRemove
ChildParams') |
| 727 ..fields = <mojom_types.StructField>[ |
| 728 new mojom_types.StructField() |
| 729 ..declData = (new mojom_types.DeclarationData()..shortName = 'ChildKey') |
| 730 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UI
NT32), |
| 731 ]; |
| 732 } |
| 733 |
| 620 | 734 |
| 621 class ViewHostLayoutChildParams extends bindings.Struct { | 735 class ViewHostLayoutChildParams extends bindings.Struct { |
| 622 static const List<bindings.StructDataHeader> kVersions = const [ | 736 static const List<bindings.StructDataHeader> kVersions = const [ |
| 623 const bindings.StructDataHeader(24, 0) | 737 const bindings.StructDataHeader(24, 0) |
| 624 ]; | 738 ]; |
| 625 int childKey = 0; | 739 int childKey = 0; |
| 626 layouts_mojom.ViewLayoutParams childLayoutParams = null; | 740 layouts_mojom.ViewLayoutParams childLayoutParams = null; |
| 627 | 741 |
| 628 ViewHostLayoutChildParams() : super(kVersions.last.size); | 742 ViewHostLayoutChildParams() : super(kVersions.last.size); |
| 629 | 743 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 } | 801 } |
| 688 | 802 |
| 689 Map toJson() { | 803 Map toJson() { |
| 690 Map map = new Map(); | 804 Map map = new Map(); |
| 691 map["childKey"] = childKey; | 805 map["childKey"] = childKey; |
| 692 map["childLayoutParams"] = childLayoutParams; | 806 map["childLayoutParams"] = childLayoutParams; |
| 693 return map; | 807 return map; |
| 694 } | 808 } |
| 695 } | 809 } |
| 696 | 810 |
| 811 mojom_types.MojomStruct _views_ViewHost_LayoutChild_Params__() { |
| 812 return new mojom_types.MojomStruct() |
| 813 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewHostLayout
ChildParams') |
| 814 ..fields = <mojom_types.StructField>[ |
| 815 new mojom_types.StructField() |
| 816 ..declData = (new mojom_types.DeclarationData()..shortName = 'ChildKey') |
| 817 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UI
NT32), |
| 818 |
| 819 new mojom_types.StructField() |
| 820 ..declData = (new mojom_types.DeclarationData()..shortName = 'ChildLayou
tParams') |
| 821 ..type = (new mojom_types.Type() |
| 822 ..typeReference = (new mojom_types.TypeReference() |
| 823 |
| 824 ..identifier = '_layouts_ViewLayoutParams__' |
| 825 ..typeKey = '_layouts_ViewLayoutParams__' |
| 826 )), |
| 827 ]; |
| 828 } |
| 829 |
| 697 | 830 |
| 698 class ViewHostLayoutChildResponseParams extends bindings.Struct { | 831 class ViewHostLayoutChildResponseParams extends bindings.Struct { |
| 699 static const List<bindings.StructDataHeader> kVersions = const [ | 832 static const List<bindings.StructDataHeader> kVersions = const [ |
| 700 const bindings.StructDataHeader(16, 0) | 833 const bindings.StructDataHeader(16, 0) |
| 701 ]; | 834 ]; |
| 702 layouts_mojom.ViewLayoutInfo info = null; | 835 layouts_mojom.ViewLayoutInfo info = null; |
| 703 | 836 |
| 704 ViewHostLayoutChildResponseParams() : super(kVersions.last.size); | 837 ViewHostLayoutChildResponseParams() : super(kVersions.last.size); |
| 705 | 838 |
| 706 static ViewHostLayoutChildResponseParams deserialize(bindings.Message message)
{ | 839 static ViewHostLayoutChildResponseParams deserialize(bindings.Message message)
{ |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 "info: $info" ")"; | 888 "info: $info" ")"; |
| 756 } | 889 } |
| 757 | 890 |
| 758 Map toJson() { | 891 Map toJson() { |
| 759 Map map = new Map(); | 892 Map map = new Map(); |
| 760 map["info"] = info; | 893 map["info"] = info; |
| 761 return map; | 894 return map; |
| 762 } | 895 } |
| 763 } | 896 } |
| 764 | 897 |
| 898 mojom_types.MojomStruct _views_ViewHost_LayoutChild_ResponseParams__() { |
| 899 return new mojom_types.MojomStruct() |
| 900 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewHostLayout
ChildResponseParams') |
| 901 ..fields = <mojom_types.StructField>[ |
| 902 new mojom_types.StructField() |
| 903 ..declData = (new mojom_types.DeclarationData()..shortName = 'Info') |
| 904 ..type = (new mojom_types.Type() |
| 905 ..typeReference = (new mojom_types.TypeReference() |
| 906 ..nullable = true |
| 907 |
| 908 |
| 909 ..identifier = '_layouts_ViewLayoutInfo__' |
| 910 ..typeKey = '_layouts_ViewLayoutInfo__' |
| 911 )), |
| 912 ]; |
| 913 } |
| 914 |
| 915 |
| 765 const int kView_onLayout_name = 0; | 916 const int kView_onLayout_name = 0; |
| 766 const int kView_onChildUnavailable_name = 1; | 917 const int kView_onChildUnavailable_name = 1; |
| 767 | 918 |
| 768 const String ViewName = | 919 const String ViewName = |
| 769 'mojo::ui::View'; | 920 'mojo::ui::View'; |
| 770 | 921 |
| 922 mojom_types.MojomInterface _views_View__() { |
| 923 return new mojom_types.MojomInterface() |
| 924 ..declData = (new mojom_types.DeclarationData()..shortName = "View") |
| 925 ..interfaceName = "View" |
| 926 ..methods = <int, mojom_types.MojomMethod>{ |
| 927 kView_onLayout_name: new mojom_types.MojomMethod() |
| 928 ..declData = (new mojom_types.DeclarationData()..shortName = "OnLayout") |
| 929 ..ordinal = kView_onLayout_name |
| 930 ..responseParams = _views_View_OnLayout_ResponseParams__()..parameters =
_views_View_OnLayout_Params__(),kView_onChildUnavailable_name: new mojom_types.
MojomMethod() |
| 931 ..declData = (new mojom_types.DeclarationData()..shortName = "OnChildUna
vailable") |
| 932 ..ordinal = kView_onChildUnavailable_name |
| 933 ..responseParams = _views_View_OnChildUnavailable_ResponseParams__()..pa
rameters = _views_View_OnChildUnavailable_Params__(), |
| 934 }; |
| 935 } |
| 936 |
| 937 class _ViewServiceDescription extends service_describer.ServiceDescription { |
| 938 // Avoid infinite loop by overriding serviceDescription field. |
| 939 final service_describer.ServiceDescription serviceDescription = null; |
| 940 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 941 return _views_View__(); |
| 942 } |
| 943 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 944 return getAllMojomTypeDefinitions()[typeKey]; |
| 945 } |
| 946 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 947 return getAllMojomTypeDefinitions(); |
| 948 } |
| 949 } |
| 950 |
| 771 abstract class View { | 951 abstract class View { |
| 772 dynamic onLayout(layouts_mojom.ViewLayoutParams layoutParams,List<int> childre
nNeedingLayout,[Function responseFactory = null]); | 952 dynamic onLayout(layouts_mojom.ViewLayoutParams layoutParams,List<int> childre
nNeedingLayout,[Function responseFactory = null]); |
| 773 dynamic onChildUnavailable(int childKey,[Function responseFactory = null]); | 953 dynamic onChildUnavailable(int childKey,[Function responseFactory = null]); |
| 774 | 954 |
| 775 } | 955 } |
| 776 | 956 |
| 777 | 957 |
| 778 class ViewProxyImpl extends bindings.Proxy { | 958 class ViewProxyImpl extends bindings.Proxy { |
| 779 ViewProxyImpl.fromEndpoint( | 959 ViewProxyImpl.fromEndpoint( |
| 780 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 960 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
| 781 | 961 |
| 782 ViewProxyImpl.fromHandle(core.MojoHandle handle) : | 962 ViewProxyImpl.fromHandle(core.MojoHandle handle) : |
| 783 super.fromHandle(handle); | 963 super.fromHandle(handle); |
| 784 | 964 |
| 785 ViewProxyImpl.unbound() : super.unbound(); | 965 ViewProxyImpl.unbound() : super.unbound(); |
| 786 | 966 |
| 787 static ViewProxyImpl newFromEndpoint( | 967 static ViewProxyImpl newFromEndpoint( |
| 788 core.MojoMessagePipeEndpoint endpoint) { | 968 core.MojoMessagePipeEndpoint endpoint) { |
| 789 assert(endpoint.setDescription("For ViewProxyImpl")); | 969 assert(endpoint.setDescription("For ViewProxyImpl")); |
| 790 return new ViewProxyImpl.fromEndpoint(endpoint); | 970 return new ViewProxyImpl.fromEndpoint(endpoint); |
| 791 } | 971 } |
| 792 | 972 |
| 793 String get name => ViewName; | 973 String get name => ViewName; |
| 794 | 974 |
| 975 service_describer.ServiceDescription get serviceDescription => |
| 976 new _ViewServiceDescription(); |
| 977 |
| 795 void handleResponse(bindings.ServiceMessage message) { | 978 void handleResponse(bindings.ServiceMessage message) { |
| 796 switch (message.header.type) { | 979 switch (message.header.type) { |
| 797 case kView_onLayout_name: | 980 case kView_onLayout_name: |
| 798 var r = ViewOnLayoutResponseParams.deserialize( | 981 var r = ViewOnLayoutResponseParams.deserialize( |
| 799 message.payload); | 982 message.payload); |
| 800 if (!message.header.hasRequestId) { | 983 if (!message.header.hasRequestId) { |
| 801 proxyError("Expected a message with a valid request Id."); | 984 proxyError("Expected a message with a valid request Id."); |
| 802 return; | 985 return; |
| 803 } | 986 } |
| 804 Completer c = completerMap[message.header.requestId]; | 987 Completer c = completerMap[message.header.requestId]; |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 assert(_impl == null); | 1210 assert(_impl == null); |
| 1028 _impl = d; | 1211 _impl = d; |
| 1029 } | 1212 } |
| 1030 | 1213 |
| 1031 String toString() { | 1214 String toString() { |
| 1032 var superString = super.toString(); | 1215 var superString = super.toString(); |
| 1033 return "ViewStub($superString)"; | 1216 return "ViewStub($superString)"; |
| 1034 } | 1217 } |
| 1035 | 1218 |
| 1036 int get version => 0; | 1219 int get version => 0; |
| 1220 |
| 1221 service_describer.ServiceDescription get serviceDescription => |
| 1222 new _ViewServiceDescription(); |
| 1037 } | 1223 } |
| 1038 | 1224 |
| 1039 const int kViewHost_getServiceProvider_name = 0; | 1225 const int kViewHost_getServiceProvider_name = 0; |
| 1040 const int kViewHost_requestLayout_name = 1; | 1226 const int kViewHost_requestLayout_name = 1; |
| 1041 const int kViewHost_addChild_name = 2; | 1227 const int kViewHost_addChild_name = 2; |
| 1042 const int kViewHost_removeChild_name = 3; | 1228 const int kViewHost_removeChild_name = 3; |
| 1043 const int kViewHost_layoutChild_name = 4; | 1229 const int kViewHost_layoutChild_name = 4; |
| 1044 | 1230 |
| 1045 const String ViewHostName = | 1231 const String ViewHostName = |
| 1046 'mojo::ui::ViewHost'; | 1232 'mojo::ui::ViewHost'; |
| 1047 | 1233 |
| 1234 mojom_types.MojomInterface _views_ViewHost__() { |
| 1235 return new mojom_types.MojomInterface() |
| 1236 ..declData = (new mojom_types.DeclarationData()..shortName = "ViewHost") |
| 1237 ..interfaceName = "ViewHost" |
| 1238 ..methods = <int, mojom_types.MojomMethod>{ |
| 1239 kViewHost_getServiceProvider_name: new mojom_types.MojomMethod() |
| 1240 ..declData = (new mojom_types.DeclarationData()..shortName = "GetService
Provider") |
| 1241 ..ordinal = kViewHost_getServiceProvider_name..parameters = _views_ViewH
ost_GetServiceProvider_Params__(),kViewHost_requestLayout_name: new mojom_types.
MojomMethod() |
| 1242 ..declData = (new mojom_types.DeclarationData()..shortName = "RequestLay
out") |
| 1243 ..ordinal = kViewHost_requestLayout_name..parameters = _views_ViewHost_R
equestLayout_Params__(),kViewHost_addChild_name: new mojom_types.MojomMethod() |
| 1244 ..declData = (new mojom_types.DeclarationData()..shortName = "AddChild") |
| 1245 ..ordinal = kViewHost_addChild_name..parameters = _views_ViewHost_AddChi
ld_Params__(),kViewHost_removeChild_name: new mojom_types.MojomMethod() |
| 1246 ..declData = (new mojom_types.DeclarationData()..shortName = "RemoveChil
d") |
| 1247 ..ordinal = kViewHost_removeChild_name..parameters = _views_ViewHost_Rem
oveChild_Params__(),kViewHost_layoutChild_name: new mojom_types.MojomMethod() |
| 1248 ..declData = (new mojom_types.DeclarationData()..shortName = "LayoutChil
d") |
| 1249 ..ordinal = kViewHost_layoutChild_name |
| 1250 ..responseParams = _views_ViewHost_LayoutChild_ResponseParams__()..param
eters = _views_ViewHost_LayoutChild_Params__(), |
| 1251 }; |
| 1252 } |
| 1253 |
| 1254 class _ViewHostServiceDescription extends service_describer.ServiceDescription { |
| 1255 // Avoid infinite loop by overriding serviceDescription field. |
| 1256 final service_describer.ServiceDescription serviceDescription = null; |
| 1257 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 1258 return _views_ViewHost__(); |
| 1259 } |
| 1260 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 1261 return getAllMojomTypeDefinitions()[typeKey]; |
| 1262 } |
| 1263 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 1264 return getAllMojomTypeDefinitions(); |
| 1265 } |
| 1266 } |
| 1267 |
| 1048 abstract class ViewHost { | 1268 abstract class ViewHost { |
| 1049 void getServiceProvider(Object serviceProvider); | 1269 void getServiceProvider(Object serviceProvider); |
| 1050 void requestLayout(); | 1270 void requestLayout(); |
| 1051 void addChild(int childKey, ViewToken childViewToken); | 1271 void addChild(int childKey, ViewToken childViewToken); |
| 1052 void removeChild(int childKey); | 1272 void removeChild(int childKey); |
| 1053 dynamic layoutChild(int childKey,layouts_mojom.ViewLayoutParams childLayoutPar
ams,[Function responseFactory = null]); | 1273 dynamic layoutChild(int childKey,layouts_mojom.ViewLayoutParams childLayoutPar
ams,[Function responseFactory = null]); |
| 1054 | 1274 |
| 1055 } | 1275 } |
| 1056 | 1276 |
| 1057 | 1277 |
| 1058 class ViewHostProxyImpl extends bindings.Proxy { | 1278 class ViewHostProxyImpl extends bindings.Proxy { |
| 1059 ViewHostProxyImpl.fromEndpoint( | 1279 ViewHostProxyImpl.fromEndpoint( |
| 1060 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 1280 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
| 1061 | 1281 |
| 1062 ViewHostProxyImpl.fromHandle(core.MojoHandle handle) : | 1282 ViewHostProxyImpl.fromHandle(core.MojoHandle handle) : |
| 1063 super.fromHandle(handle); | 1283 super.fromHandle(handle); |
| 1064 | 1284 |
| 1065 ViewHostProxyImpl.unbound() : super.unbound(); | 1285 ViewHostProxyImpl.unbound() : super.unbound(); |
| 1066 | 1286 |
| 1067 static ViewHostProxyImpl newFromEndpoint( | 1287 static ViewHostProxyImpl newFromEndpoint( |
| 1068 core.MojoMessagePipeEndpoint endpoint) { | 1288 core.MojoMessagePipeEndpoint endpoint) { |
| 1069 assert(endpoint.setDescription("For ViewHostProxyImpl")); | 1289 assert(endpoint.setDescription("For ViewHostProxyImpl")); |
| 1070 return new ViewHostProxyImpl.fromEndpoint(endpoint); | 1290 return new ViewHostProxyImpl.fromEndpoint(endpoint); |
| 1071 } | 1291 } |
| 1072 | 1292 |
| 1073 String get name => ViewHostName; | 1293 String get name => ViewHostName; |
| 1074 | 1294 |
| 1295 service_describer.ServiceDescription get serviceDescription => |
| 1296 new _ViewHostServiceDescription(); |
| 1297 |
| 1075 void handleResponse(bindings.ServiceMessage message) { | 1298 void handleResponse(bindings.ServiceMessage message) { |
| 1076 switch (message.header.type) { | 1299 switch (message.header.type) { |
| 1077 case kViewHost_layoutChild_name: | 1300 case kViewHost_layoutChild_name: |
| 1078 var r = ViewHostLayoutChildResponseParams.deserialize( | 1301 var r = ViewHostLayoutChildResponseParams.deserialize( |
| 1079 message.payload); | 1302 message.payload); |
| 1080 if (!message.header.hasRequestId) { | 1303 if (!message.header.hasRequestId) { |
| 1081 proxyError("Expected a message with a valid request Id."); | 1304 proxyError("Expected a message with a valid request Id."); |
| 1082 return; | 1305 return; |
| 1083 } | 1306 } |
| 1084 Completer c = completerMap[message.header.requestId]; | 1307 Completer c = completerMap[message.header.requestId]; |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 assert(_impl == null); | 1535 assert(_impl == null); |
| 1313 _impl = d; | 1536 _impl = d; |
| 1314 } | 1537 } |
| 1315 | 1538 |
| 1316 String toString() { | 1539 String toString() { |
| 1317 var superString = super.toString(); | 1540 var superString = super.toString(); |
| 1318 return "ViewHostStub($superString)"; | 1541 return "ViewHostStub($superString)"; |
| 1319 } | 1542 } |
| 1320 | 1543 |
| 1321 int get version => 0; | 1544 int get version => 0; |
| 1545 |
| 1546 service_describer.ServiceDescription get serviceDescription => |
| 1547 new _ViewHostServiceDescription(); |
| 1322 } | 1548 } |
| 1323 | 1549 |
| 1324 | 1550 |
| 1551 |
| 1552 |
| 1553 |
| 1554 |
| 1555 |
| 1556 |
| 1557 var _MojomDesc__ = _initDescriptions(); |
| 1558 |
| 1559 Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
| 1560 var map = new Map<String, mojom_types.UserDefinedType>(); |
| 1561 |
| 1562 map["_views_ViewToken__"] = |
| 1563 new mojom_types.UserDefinedType() |
| 1564 ..structType = _views_ViewToken__(); |
| 1565 |
| 1566 |
| 1567 |
| 1568 |
| 1569 |
| 1570 map["_views_View_OnLayout_Params__"] = |
| 1571 new mojom_types.UserDefinedType() |
| 1572 ..structType = _views_View_OnLayout_Params__(); |
| 1573 |
| 1574 |
| 1575 |
| 1576 |
| 1577 |
| 1578 |
| 1579 |
| 1580 map["_views_View_OnLayout_ResponseParams__"] = |
| 1581 new mojom_types.UserDefinedType() |
| 1582 ..structType = _views_View_OnLayout_ResponseParams__(); |
| 1583 |
| 1584 |
| 1585 |
| 1586 |
| 1587 |
| 1588 map["_views_View_OnChildUnavailable_Params__"] = |
| 1589 new mojom_types.UserDefinedType() |
| 1590 ..structType = _views_View_OnChildUnavailable_Params__(); |
| 1591 |
| 1592 |
| 1593 |
| 1594 |
| 1595 |
| 1596 map["_views_View_OnChildUnavailable_ResponseParams__"] = |
| 1597 new mojom_types.UserDefinedType() |
| 1598 ..structType = _views_View_OnChildUnavailable_ResponseParams__(); |
| 1599 |
| 1600 |
| 1601 |
| 1602 map["_views_ViewHost_GetServiceProvider_Params__"] = |
| 1603 new mojom_types.UserDefinedType() |
| 1604 ..structType = _views_ViewHost_GetServiceProvider_Params__(); |
| 1605 |
| 1606 |
| 1607 |
| 1608 |
| 1609 |
| 1610 map["_views_ViewHost_RequestLayout_Params__"] = |
| 1611 new mojom_types.UserDefinedType() |
| 1612 ..structType = _views_ViewHost_RequestLayout_Params__(); |
| 1613 |
| 1614 |
| 1615 |
| 1616 map["_views_ViewHost_AddChild_Params__"] = |
| 1617 new mojom_types.UserDefinedType() |
| 1618 ..structType = _views_ViewHost_AddChild_Params__(); |
| 1619 |
| 1620 |
| 1621 |
| 1622 |
| 1623 |
| 1624 |
| 1625 |
| 1626 map["_views_ViewHost_RemoveChild_Params__"] = |
| 1627 new mojom_types.UserDefinedType() |
| 1628 ..structType = _views_ViewHost_RemoveChild_Params__(); |
| 1629 |
| 1630 |
| 1631 |
| 1632 |
| 1633 |
| 1634 map["_views_ViewHost_LayoutChild_Params__"] = |
| 1635 new mojom_types.UserDefinedType() |
| 1636 ..structType = _views_ViewHost_LayoutChild_Params__(); |
| 1637 |
| 1638 |
| 1639 |
| 1640 |
| 1641 |
| 1642 |
| 1643 |
| 1644 map["_views_ViewHost_LayoutChild_ResponseParams__"] = |
| 1645 new mojom_types.UserDefinedType() |
| 1646 ..structType = _views_ViewHost_LayoutChild_ResponseParams__(); |
| 1647 |
| 1648 |
| 1649 |
| 1650 |
| 1651 |
| 1652 map["_views_View__"] = |
| 1653 new mojom_types.UserDefinedType() |
| 1654 ..interfaceType = _views_View__(); |
| 1655 |
| 1656 |
| 1657 map["_views_ViewHost__"] = |
| 1658 new mojom_types.UserDefinedType() |
| 1659 ..interfaceType = _views_ViewHost__(); |
| 1660 |
| 1661 service_provider_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_typ
es.UserDefinedType udt) { |
| 1662 map[s] = udt; |
| 1663 }); |
| 1664 layouts_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDe
finedType udt) { |
| 1665 map[s] = udt; |
| 1666 }); |
| 1667 return map; |
| 1668 } |
| 1669 |
| 1670 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
| 1671 return _MojomDesc__; |
| 1672 } |
| 1673 |
| 1674 |
| OLD | NEW |