| 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 'app.dart'; | 7 import 'app.dart'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:collection'; | 9 import 'dart:collection'; |
| 10 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 Component.fromArgs(Object key, bool stateful) | 879 Component.fromArgs(Object key, bool stateful) |
| 880 : this(key: key, stateful: stateful); | 880 : this(key: key, stateful: stateful); |
| 881 | 881 |
| 882 static Component _currentlyBuilding; | 882 static Component _currentlyBuilding; |
| 883 bool get _isBuilding => _currentlyBuilding == this; | 883 bool get _isBuilding => _currentlyBuilding == this; |
| 884 | 884 |
| 885 bool _stateful; | 885 bool _stateful; |
| 886 bool _dirty = true; | 886 bool _dirty = true; |
| 887 bool _disqualifiedFromEverAppearingAgain = false; | 887 bool _disqualifiedFromEverAppearingAgain = false; |
| 888 | 888 |
| 889 UINode _built; |
| 890 dynamic _slot; // cached slot from the last time we were synced |
| 891 |
| 889 List<Function> _mountCallbacks; | 892 List<Function> _mountCallbacks; |
| 890 List<Function> _unmountCallbacks; | 893 List<Function> _unmountCallbacks; |
| 891 | 894 |
| 892 void onDidMount(Function fn) { | 895 void onDidMount(Function fn) { |
| 893 if (_mountCallbacks == null) | 896 if (_mountCallbacks == null) |
| 894 _mountCallbacks = new List<Function>(); | 897 _mountCallbacks = new List<Function>(); |
| 895 | 898 |
| 896 _mountCallbacks.add(fn); | 899 _mountCallbacks.add(fn); |
| 897 } | 900 } |
| 898 | 901 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 } | 1113 } |
| 1111 | 1114 |
| 1112 } | 1115 } |
| 1113 | 1116 |
| 1114 class Text extends Component { | 1117 class Text extends Component { |
| 1115 Text(this.data) : super(key: '*text*'); | 1118 Text(this.data) : super(key: '*text*'); |
| 1116 final String data; | 1119 final String data; |
| 1117 bool get interchangeable => true; | 1120 bool get interchangeable => true; |
| 1118 UINode build() => new Paragraph(text: data); | 1121 UINode build() => new Paragraph(text: data); |
| 1119 } | 1122 } |
| OLD | NEW |