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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:collection'; | 6 import 'dart:collection'; |
7 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
8 import 'dart:sky' as sky; | 8 import 'dart:sky' as sky; |
9 | 9 |
10 import '../app/view.dart'; | 10 import '../app/view.dart'; |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 // we haven't attached it yet | 809 // we haven't attached it yet |
810 UINodeAppView._appView.root = root; | 810 UINodeAppView._appView.root = root; |
811 } | 811 } |
812 assert(root.parent is RenderView); | 812 assert(root.parent is RenderView); |
813 } | 813 } |
814 | 814 |
815 } | 815 } |
816 | 816 |
817 typedef UINode Builder(); | 817 typedef UINode Builder(); |
818 | 818 |
819 class RenderObjectToUINodeAdapter extends AbstractUINodeRoot { | 819 class RenderBoxToUINodeAdapter extends AbstractUINodeRoot { |
820 | 820 |
821 RenderObjectToUINodeAdapter( | 821 RenderBoxToUINodeAdapter( |
822 RenderObjectWithChildMixin<RenderBox> container, | 822 RenderObjectWithChildMixin<RenderBox> container, |
823 this.builder | 823 this.builder |
824 ) : _container = container, super() { | 824 ) : _container = container, super() { |
825 assert(builder != null); | 825 assert(builder != null); |
826 } | 826 } |
827 | 827 |
828 RenderObjectWithChildMixin<RenderBox> _container; | 828 RenderObjectWithChildMixin<RenderBox> _container; |
829 RenderObjectWithChildMixin<RenderBox> get container => _container; | 829 RenderObjectWithChildMixin<RenderBox> get container => _container; |
830 void set container(RenderObjectWithChildMixin<RenderBox> value) { | 830 void set container(RenderObjectWithChildMixin<RenderBox> value) { |
831 if (_container != value) { | 831 if (_container != value) { |
(...skipping 16 matching lines...) Expand all Loading... |
848 super._buildIfDirty(); | 848 super._buildIfDirty(); |
849 if (root.parent == null) { | 849 if (root.parent == null) { |
850 // we haven't attached it yet | 850 // we haven't attached it yet |
851 assert(_container.child == null); | 851 assert(_container.child == null); |
852 _container.child = root; | 852 _container.child = root; |
853 } | 853 } |
854 assert(root.parent == _container); | 854 assert(root.parent == _container); |
855 } | 855 } |
856 | 856 |
857 UINode build() => builder(); | 857 UINode build() => builder(); |
858 } | 858 } |
OLD | NEW |