Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart

Issue 223553008: Only pass an AssetId to isPrimary and declareOutputs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix script_compactor Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/excluding_transformer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.load_transformers; 5 library pub.load_transformers;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 /// transformer. 84 /// transformer.
85 final SendPort _port; 85 final SendPort _port;
86 86
87 /// The result of calling [toString] on the transformer in the isolate. 87 /// The result of calling [toString] on the transformer in the isolate.
88 final String _toString; 88 final String _toString;
89 89
90 _ForeignTransformer(Map map) 90 _ForeignTransformer(Map map)
91 : _port = map['port'], 91 : _port = map['port'],
92 _toString = map['toString']; 92 _toString = map['toString'];
93 93
94 Future<bool> isPrimary(Asset asset) { 94 Future<bool> isPrimary(AssetId id) {
95 return call(_port, { 95 return call(_port, {
96 'type': 'isPrimary', 96 'type': 'isPrimary',
97 'asset': serializeAsset(asset) 97 'id': serializeId(id)
98 }); 98 });
99 } 99 }
100 100
101 Future apply(Transform transform) { 101 Future apply(Transform transform) {
102 return call(_port, { 102 return call(_port, {
103 'type': 'apply', 103 'type': 'apply',
104 'transform': serializeTransform(transform) 104 'transform': serializeTransform(transform)
105 }); 105 });
106 } 106 }
107 107
(...skipping 20 matching lines...) Expand all
128 /// Converts a serializable map into a [Transformer] or a [TransformerGroup]. 128 /// Converts a serializable map into a [Transformer] or a [TransformerGroup].
129 _deserializeTransformerOrGroup(Map map, TransformerId id) { 129 _deserializeTransformerOrGroup(Map map, TransformerId id) {
130 if (map['type'] == 'Transformer') { 130 if (map['type'] == 'Transformer') {
131 var transformer = new _ForeignTransformer(map); 131 var transformer = new _ForeignTransformer(map);
132 return ExcludingTransformer.wrap(transformer, id.includes, id.excludes); 132 return ExcludingTransformer.wrap(transformer, id.includes, id.excludes);
133 } 133 }
134 134
135 assert(map['type'] == 'TransformerGroup'); 135 assert(map['type'] == 'TransformerGroup');
136 return new _ForeignGroup(id, map); 136 return new _ForeignGroup(id, map);
137 } 137 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/excluding_transformer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698