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 scene_token_mojom; | 5 library scene_token_mojom; |
6 import 'package:mojo/bindings.dart' as bindings; | 6 import 'package:mojo/bindings.dart' as bindings; |
7 | 7 |
8 | 8 |
9 | 9 |
10 | 10 |
11 class SceneToken extends bindings.Struct { | 11 class SceneToken extends bindings.Struct { |
12 static const List<bindings.StructDataHeader> kVersions = const [ | 12 static const List<bindings.StructDataHeader> kVersions = const [ |
13 const bindings.StructDataHeader(16, 0) | 13 const bindings.StructDataHeader(16, 0) |
14 ]; | 14 ]; |
15 int value = 0; | 15 int value = 0; |
16 | 16 |
17 SceneToken() : super(kVersions.last.size); | 17 SceneToken() : super(kVersions.last.size); |
18 | 18 |
| 19 SceneToken.init( |
| 20 int this.value |
| 21 ) : super(kVersions.last.size); |
| 22 |
19 static SceneToken deserialize(bindings.Message message) { | 23 static SceneToken deserialize(bindings.Message message) { |
20 var decoder = new bindings.Decoder(message); | 24 var decoder = new bindings.Decoder(message); |
21 var result = decode(decoder); | 25 var result = decode(decoder); |
22 if (decoder.excessHandles != null) { | 26 if (decoder.excessHandles != null) { |
23 decoder.excessHandles.forEach((h) => h.close()); | 27 decoder.excessHandles.forEach((h) => h.close()); |
24 } | 28 } |
25 return result; | 29 return result; |
26 } | 30 } |
27 | 31 |
28 static SceneToken decode(bindings.Decoder decoder0) { | 32 static SceneToken decode(bindings.Decoder decoder0) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 78 |
75 Map toJson() { | 79 Map toJson() { |
76 Map map = new Map(); | 80 Map map = new Map(); |
77 map["value"] = value; | 81 map["value"] = value; |
78 return map; | 82 return map; |
79 } | 83 } |
80 } | 84 } |
81 | 85 |
82 | 86 |
83 | 87 |
OLD | NEW |