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

Side by Side Diff: pkg/barback/test/transformer/mock.dart

Issue 299833003: Expose aggregate transformers in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 6 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
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 barback.test.transformer.mock; 5 library barback.test.transformer.mock;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:barback/barback.dart'; 9 import 'package:barback/barback.dart';
10 import 'package:barback/src/utils.dart'; 10 import 'package:barback/src/utils.dart';
(...skipping 12 matching lines...) Expand all
23 /// The number of times the transformer has been applied. 23 /// The number of times the transformer has been applied.
24 /// 24 ///
25 /// This is scheduled. The Future will complete at the point in the schedule 25 /// This is scheduled. The Future will complete at the point in the schedule
26 /// that this is called. 26 /// that this is called.
27 Future<int> get numRuns => schedule(() => _numRuns); 27 Future<int> get numRuns => schedule(() => _numRuns);
28 var _numRuns = 0; 28 var _numRuns = 0;
29 29
30 /// The number of currently running transforms. 30 /// The number of currently running transforms.
31 int _runningTransforms = 0; 31 int _runningTransforms = 0;
32 32
33 /// A completer for pausing the transformer before it finishes running [apply] . 33 /// A completer for pausing the transformer before it finishes running
34 /// [apply].
34 Completer _apply; 35 Completer _apply;
35 36
36 /// Completers for pausing the transformer before it finishes running 37 /// Completers for pausing the transformer before it finishes running
37 /// [isPrimary]. 38 /// [isPrimary].
38 final _isPrimary = new Map<AssetId, Completer>(); 39 final _isPrimary = new Map<AssetId, Completer>();
39 40
40 /// Completers for pausing the transformer before it finishes getting inputs 41 /// Completers for pausing the transformer before it finishes getting inputs
41 /// the [Transform]. 42 /// the [Transform].
42 final _getInput = new Map<AssetId, Completer>(); 43 final _getInput = new Map<AssetId, Completer>();
43 44
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 /// This may return a `Future<bool>` or, if it's entirely synchronous, a 195 /// This may return a `Future<bool>` or, if it's entirely synchronous, a
195 /// `bool`. 196 /// `bool`.
196 doIsPrimary(AssetId id); 197 doIsPrimary(AssetId id);
197 198
198 /// The wrapped version of [doApply] for subclasses to override. 199 /// The wrapped version of [doApply] for subclasses to override.
199 /// 200 ///
200 /// If this does asynchronous work, it should return a [Future] that completes 201 /// If this does asynchronous work, it should return a [Future] that completes
201 /// once it's finished. 202 /// once it's finished.
202 doApply(Transform transform); 203 doApply(Transform transform);
203 } 204 }
OLDNEW
« no previous file with comments | « pkg/barback/test/transformer/lazy_assets.dart ('k') | pkg/barback/test/transformer/mock_aggregate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698