| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 library fn; | 5 library fn; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:sky' as sky; | 9 import 'dart:sky' as sky; |
| 10 import 'reflect.dart' as reflect; | 10 import 'reflect.dart' as reflect; |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 final int _order; | 591 final int _order; |
| 592 static int _currentOrder = 0; | 592 static int _currentOrder = 0; |
| 593 bool _stateful; | 593 bool _stateful; |
| 594 static Component _currentlyBuilding; | 594 static Component _currentlyBuilding; |
| 595 | 595 |
| 596 Component({ Object key, bool stateful }) | 596 Component({ Object key, bool stateful }) |
| 597 : _stateful = stateful != null ? stateful : false, | 597 : _stateful = stateful != null ? stateful : false, |
| 598 _order = _currentOrder + 1, | 598 _order = _currentOrder + 1, |
| 599 super(key:key); | 599 super(key:key); |
| 600 | 600 |
| 601 Component.fromArgs(Object key, bool stateful) |
| 602 : this(key: key, stateful: stateful); |
| 603 |
| 601 void didMount() {} | 604 void didMount() {} |
| 602 void didUnmount() {} | 605 void didUnmount() {} |
| 603 | 606 |
| 604 // TODO(rafaelw): It seems wrong to expose DOM at all. This is presently | 607 // TODO(rafaelw): It seems wrong to expose DOM at all. This is presently |
| 605 // needed to get sizing info. | 608 // needed to get sizing info. |
| 606 sky.Node getRoot() => _root; | 609 sky.Node getRoot() => _root; |
| 607 | 610 |
| 608 void _remove() { | 611 void _remove() { |
| 609 assert(_built != null); | 612 assert(_built != null); |
| 610 assert(_root != null); | 613 assert(_root != null); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 | 710 |
| 708 _sync(null, _host, null); | 711 _sync(null, _host, null); |
| 709 assert(_root is sky.Node); | 712 assert(_root is sky.Node); |
| 710 | 713 |
| 711 sw.stop(); | 714 sw.stop(); |
| 712 if (_shouldLogRenderDuration) | 715 if (_shouldLogRenderDuration) |
| 713 print("Initial build: ${sw.elapsedMicroseconds} microseconds"); | 716 print("Initial build: ${sw.elapsedMicroseconds} microseconds"); |
| 714 }); | 717 }); |
| 715 } | 718 } |
| 716 } | 719 } |
| OLD | NEW |