OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library pub.asset.serialize.aggregate_transform; | 5 library pub.asset.serialize.aggregate_transform; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:isolate'; | 8 import 'dart:isolate'; |
9 | 9 |
10 import 'package:barback/barback.dart'; | 10 import 'package:barback/barback.dart'; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 void consumePrimary(AssetId id) { | 114 void consumePrimary(AssetId id) { |
115 call(_port, {'type': 'consumePrimary', 'assetId': serializeId(id)}); | 115 call(_port, {'type': 'consumePrimary', 'assetId': serializeId(id)}); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 // We can get away with only removing the class declarations in incompatible | 119 // We can get away with only removing the class declarations in incompatible |
120 // barback versions because merely referencing undefined types in type | 120 // barback versions because merely referencing undefined types in type |
121 // annotations isn't a static error. Only implementing an undefined interface is | 121 // annotations isn't a static error. Only implementing an undefined interface is |
122 // a static error. | 122 // a static error. |
123 //# if barback >=0.14.1-dev | 123 //# if barback >=0.14.1 |
124 | 124 |
125 /// A wrapper for an [AggregateTransform] that's in the host isolate. | 125 /// A wrapper for an [AggregateTransform] that's in the host isolate. |
126 /// | 126 /// |
127 /// This retrieves inputs from and sends outputs and logs to the host isolate. | 127 /// This retrieves inputs from and sends outputs and logs to the host isolate. |
128 class ForeignAggregateTransform extends _ForeignBaseAggregateTransform | 128 class ForeignAggregateTransform extends _ForeignBaseAggregateTransform |
129 with GetInputTransform implements AggregateTransform { | 129 with GetInputTransform implements AggregateTransform { |
130 final Stream<Asset> primaryInputs; | 130 final Stream<Asset> primaryInputs; |
131 | 131 |
132 /// Creates a transform from a serialized map sent from the host isolate. | 132 /// Creates a transform from a serialized map sent from the host isolate. |
133 ForeignAggregateTransform(Map transform) | 133 ForeignAggregateTransform(Map transform) |
(...skipping 30 matching lines...) Expand all Loading... |
164 | 164 |
165 void declareOutput(AssetId id) { | 165 void declareOutput(AssetId id) { |
166 call(_port, { | 166 call(_port, { |
167 'type': 'declareOutput', | 167 'type': 'declareOutput', |
168 'output': serializeId(id) | 168 'output': serializeId(id) |
169 }); | 169 }); |
170 } | 170 } |
171 } | 171 } |
172 | 172 |
173 //# end | 173 //# end |
OLD | NEW |