| 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 layouts_mojom; | 5 library layouts_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 |
| 11 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; | 13 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; |
| 12 import 'package:mojo_services/mojo/gfx/composition/scene_token.mojom.dart' as sc
ene_token_mojom; | 14 import 'package:mojo_services/mojo/gfx/composition/scene_token.mojom.dart' as sc
ene_token_mojom; |
| 13 | 15 |
| 14 | 16 |
| 15 | 17 |
| 16 class BoxConstraints extends bindings.Struct { | 18 class BoxConstraints extends bindings.Struct { |
| 17 static const List<bindings.StructDataHeader> kVersions = const [ | 19 static const List<bindings.StructDataHeader> kVersions = const [ |
| 18 const bindings.StructDataHeader(24, 0) | 20 const bindings.StructDataHeader(24, 0) |
| 19 ]; | 21 ]; |
| 20 int minWidth = 0; | 22 int minWidth = 0; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 Map map = new Map(); | 102 Map map = new Map(); |
| 101 map["minWidth"] = minWidth; | 103 map["minWidth"] = minWidth; |
| 102 map["maxWidth"] = maxWidth; | 104 map["maxWidth"] = maxWidth; |
| 103 map["minHeight"] = minHeight; | 105 map["minHeight"] = minHeight; |
| 104 map["maxHeight"] = maxHeight; | 106 map["maxHeight"] = maxHeight; |
| 105 return map; | 107 return map; |
| 106 } | 108 } |
| 107 } | 109 } |
| 108 | 110 |
| 109 | 111 |
| 112 |
| 113 |
| 110 class ViewLayoutParams extends bindings.Struct { | 114 class ViewLayoutParams extends bindings.Struct { |
| 111 static const List<bindings.StructDataHeader> kVersions = const [ | 115 static const List<bindings.StructDataHeader> kVersions = const [ |
| 112 const bindings.StructDataHeader(24, 0) | 116 const bindings.StructDataHeader(24, 0) |
| 113 ]; | 117 ]; |
| 114 BoxConstraints constraints = null; | 118 BoxConstraints constraints = null; |
| 115 double devicePixelRatio = 1.0; | 119 double devicePixelRatio = 1.0; |
| 116 | 120 |
| 117 ViewLayoutParams() : super(kVersions.last.size); | 121 ViewLayoutParams() : super(kVersions.last.size); |
| 118 | 122 |
| 119 static ViewLayoutParams deserialize(bindings.Message message) { | 123 static ViewLayoutParams deserialize(bindings.Message message) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 181 |
| 178 Map toJson() { | 182 Map toJson() { |
| 179 Map map = new Map(); | 183 Map map = new Map(); |
| 180 map["constraints"] = constraints; | 184 map["constraints"] = constraints; |
| 181 map["devicePixelRatio"] = devicePixelRatio; | 185 map["devicePixelRatio"] = devicePixelRatio; |
| 182 return map; | 186 return map; |
| 183 } | 187 } |
| 184 } | 188 } |
| 185 | 189 |
| 186 | 190 |
| 191 |
| 192 |
| 187 class ViewLayoutInfo extends bindings.Struct { | 193 class ViewLayoutInfo extends bindings.Struct { |
| 188 static const List<bindings.StructDataHeader> kVersions = const [ | 194 static const List<bindings.StructDataHeader> kVersions = const [ |
| 189 const bindings.StructDataHeader(24, 0) | 195 const bindings.StructDataHeader(24, 0) |
| 190 ]; | 196 ]; |
| 191 scene_token_mojom.SceneToken sceneToken = null; | 197 scene_token_mojom.SceneToken sceneToken = null; |
| 192 geometry_mojom.Size size = null; | 198 geometry_mojom.Size size = null; |
| 193 | 199 |
| 194 ViewLayoutInfo() : super(kVersions.last.size); | 200 ViewLayoutInfo() : super(kVersions.last.size); |
| 195 | 201 |
| 196 static ViewLayoutInfo deserialize(bindings.Message message) { | 202 static ViewLayoutInfo deserialize(bindings.Message message) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 261 |
| 256 Map toJson() { | 262 Map toJson() { |
| 257 Map map = new Map(); | 263 Map map = new Map(); |
| 258 map["sceneToken"] = sceneToken; | 264 map["sceneToken"] = sceneToken; |
| 259 map["size"] = size; | 265 map["size"] = size; |
| 260 return map; | 266 return map; |
| 261 } | 267 } |
| 262 } | 268 } |
| 263 | 269 |
| 264 | 270 |
| 271 |
| 272 |
| 265 class ViewLayoutResult extends bindings.Struct { | 273 class ViewLayoutResult extends bindings.Struct { |
| 266 static const List<bindings.StructDataHeader> kVersions = const [ | 274 static const List<bindings.StructDataHeader> kVersions = const [ |
| 267 const bindings.StructDataHeader(16, 0) | 275 const bindings.StructDataHeader(16, 0) |
| 268 ]; | 276 ]; |
| 269 geometry_mojom.Size size = null; | 277 geometry_mojom.Size size = null; |
| 270 | 278 |
| 271 ViewLayoutResult() : super(kVersions.last.size); | 279 ViewLayoutResult() : super(kVersions.last.size); |
| 272 | 280 |
| 273 static ViewLayoutResult deserialize(bindings.Message message) { | 281 static ViewLayoutResult deserialize(bindings.Message message) { |
| 274 var decoder = new bindings.Decoder(message); | 282 var decoder = new bindings.Decoder(message); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 } | 331 } |
| 324 | 332 |
| 325 Map toJson() { | 333 Map toJson() { |
| 326 Map map = new Map(); | 334 Map map = new Map(); |
| 327 map["size"] = size; | 335 map["size"] = size; |
| 328 return map; | 336 return map; |
| 329 } | 337 } |
| 330 } | 338 } |
| 331 | 339 |
| 332 | 340 |
| 341 |
| 342 |
| 343 |
| 344 |
| OLD | NEW |