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

Side by Side Diff: pkg/barback/lib/src/graph/asset_cascade.dart

Issue 554783003: Add the ability for a PackageProvider to declare static packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « pkg/barback/CHANGELOG.md ('k') | pkg/barback/lib/src/graph/package_graph.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) 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.graph.asset_cascade; 5 library barback.graph.asset_cascade;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../asset/asset.dart'; 9 import '../asset/asset.dart';
10 import '../asset/asset_id.dart'; 10 import '../asset/asset_id.dart';
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // itself. 75 // itself.
76 return _phases.last.status; 76 return _phases.last.status;
77 } 77 }
78 78
79 /// The streams exposed by this cascade. 79 /// The streams exposed by this cascade.
80 final _streams = new NodeStreams(); 80 final _streams = new NodeStreams();
81 Stream<LogEntry> get onLog => _streams.onLog; 81 Stream<LogEntry> get onLog => _streams.onLog;
82 Stream<NodeStatus> get onStatusChange => _streams.onStatusChange; 82 Stream<NodeStatus> get onStatusChange => _streams.onStatusChange;
83 83
84 /// Returns all currently-available output assets from this cascade. 84 /// Returns all currently-available output assets from this cascade.
85 AssetSet get availableOutputs => 85 Future<AssetSet> get availableOutputs => new Future.value(new AssetSet.from(
86 new AssetSet.from(_phases.last.availableOutputs.map((node) => node.asset)); 86 _phases.last.availableOutputs.map((node) => node.asset)));
87 87
88 /// Creates a new [AssetCascade]. 88 /// Creates a new [AssetCascade].
89 /// 89 ///
90 /// It loads source assets within [package] using [provider]. 90 /// It loads source assets within [package] using [provider].
91 AssetCascade(this.graph, this.package) { 91 AssetCascade(this.graph, this.package) {
92 _addPhase(new Phase(this, package)); 92 _addPhase(new Phase(this, package));
93 } 93 }
94 94
95 /// Gets the asset identified by [id]. 95 /// Gets the asset identified by [id].
96 /// 96 ///
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 _streams.onLogPool.add(phase.onLog); 214 _streams.onLogPool.add(phase.onLog);
215 if (_phaseStatusSubscription != null) _phaseStatusSubscription.cancel(); 215 if (_phaseStatusSubscription != null) _phaseStatusSubscription.cancel();
216 _phaseStatusSubscription = 216 _phaseStatusSubscription =
217 phase.onStatusChange.listen(_streams.changeStatus); 217 phase.onStatusChange.listen(_streams.changeStatus);
218 218
219 _phases.add(phase); 219 _phases.add(phase);
220 } 220 }
221 221
222 String toString() => "cascade for $package"; 222 String toString() => "cascade for $package";
223 } 223 }
OLDNEW
« no previous file with comments | « pkg/barback/CHANGELOG.md ('k') | pkg/barback/lib/src/graph/package_graph.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698