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

Side by Side Diff: lib/src/asset/dart/serialize/aggregate_transform.dart

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 4 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
« no previous file with comments | « lib/src/asset/dart/serialize.dart ('k') | lib/src/asset/dart/serialize/exception.dart » ('j') | 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) 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:isolate'; 6 import 'dart:isolate';
7 7
8 import 'package:barback/barback.dart'; 8 import 'package:barback/barback.dart';
9 // TODO(nweiz): don't import from "src" once issue 14966 is fixed. 9 // TODO(nweiz): don't import from "src" once issue 14966 is fixed.
10 import 'package:barback/src/internal_asset.dart'; 10 import 'package:barback/src/internal_asset.dart';
11 11
12 import '../serialize.dart'; 12 import '../serialize.dart';
13 import 'get_input_transform.dart'; 13 import 'get_input_transform.dart';
14 14
15 /// Serialize the methods shared between [AggregateTransform] and 15 /// Serialize the methods shared between [AggregateTransform] and
16 /// [DeclaringAggregateTransform]. 16 /// [DeclaringAggregateTransform].
17 /// 17 ///
18 /// [additionalFields] contains additional serialized fields to add to the 18 /// [additionalFields] contains additional serialized fields to add to the
19 /// serialized transform. [methodHandlers] is a set of additional methods. Each 19 /// serialized transform. [methodHandlers] is a set of additional methods. Each
20 /// value should take a JSON message and return the response (which may be a 20 /// value should take a JSON message and return the response (which may be a
21 /// Future). 21 /// Future).
22 Map _serializeBaseAggregateTransform(transform, Map additionalFields, 22 Map _serializeBaseAggregateTransform(transform,
23 Map<String, dynamic> additionalFields,
23 Map<String, Function> methodHandlers) { 24 Map<String, Function> methodHandlers) {
24 var receivePort = new ReceivePort(); 25 var receivePort = new ReceivePort();
25 receivePort.listen((wrappedMessage) { 26 receivePort.listen((wrappedMessage) {
26 respond(wrappedMessage, (message) { 27 respond(wrappedMessage, (message) {
27 var handler = methodHandlers[message['type']]; 28 var handler = methodHandlers[message['type']];
28 if (handler != null) return handler(message); 29 if (handler != null) return handler(message);
29 30
30 if (message['type'] == 'consumePrimary') { 31 if (message['type'] == 'consumePrimary') {
31 transform.consumePrimary(deserializeId(message['assetId'])); 32 transform.consumePrimary(deserializeId(message['assetId']));
32 return null; 33 return null;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 transform['primaryIds'], deserializeId), 160 transform['primaryIds'], deserializeId),
160 super(transform); 161 super(transform);
161 162
162 void declareOutput(AssetId id) { 163 void declareOutput(AssetId id) {
163 call(_port, { 164 call(_port, {
164 'type': 'declareOutput', 165 'type': 'declareOutput',
165 'output': serializeId(id) 166 'output': serializeId(id)
166 }); 167 });
167 } 168 }
168 } 169 }
OLDNEW
« no previous file with comments | « lib/src/asset/dart/serialize.dart ('k') | lib/src/asset/dart/serialize/exception.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698