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

Unified Diff: samples/swarm/swarm_ui_lib/view/view.dart

Issue 12218131: Combine window.setTimeout/setInterval with Timer and Timer.repeating. Also (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: samples/swarm/swarm_ui_lib/view/view.dart
diff --git a/samples/swarm/swarm_ui_lib/view/view.dart b/samples/swarm/swarm_ui_lib/view/view.dart
index 32dba6d4b1488b2ce3845eb98e415ac21c5ba62c..5f372783a38d1c9bee343275949d9d3575e04935 100644
--- a/samples/swarm/swarm_ui_lib/view/view.dart
+++ b/samples/swarm/swarm_ui_lib/view/view.dart
@@ -337,7 +337,7 @@ class View implements Positionable {
changedComplete = true;
});
- window.setImmediate(() {
+ window.immediate.then((_) {
if (!changedComplete) {
changed.complete(false);
}
@@ -353,7 +353,7 @@ class View implements Positionable {
// a good tradeoff?
if (ViewLayout.hasCustomLayout(this)) {
Completer sizeCompleter = new Completer<Size>();
- window.setImmediate(() {
+ window.immediate.then((_) {
sizeCompleter.complete(
new Size(_node.clientWidth, _node.clientHeight));
});

Powered by Google App Engine
This is Rietveld 408576698