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

Side by Side Diff: sky/sdk/lib/widgets/ui_node.dart

Issue 1175423007: Create an example app that demonstrates interactive coordination of an fn tree and a raw RenderObje… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « sky/sdk/lib/widgets/basic.dart ('k') | sky/tests/raw/sector_layout.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 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 // we haven't attached it yet 797 // we haven't attached it yet
798 UINodeAppView._appView.root = root; 798 UINodeAppView._appView.root = root;
799 } 799 }
800 assert(root.parent is RenderView); 800 assert(root.parent is RenderView);
801 } 801 }
802 802
803 } 803 }
804 804
805 typedef UINode Builder(); 805 typedef UINode Builder();
806 806
807 class RenderObjectToUINodeAdapter extends AbstractUINodeRoot { 807 class RenderBoxToUINodeAdapter extends AbstractUINodeRoot {
808 808
809 RenderObjectToUINodeAdapter( 809 RenderBoxToUINodeAdapter(
810 RenderObjectWithChildMixin<RenderBox> container, 810 RenderObjectWithChildMixin<RenderBox> container,
811 this.builder 811 this.builder
812 ) : _container = container, super() { 812 ) : _container = container, super() {
813 assert(builder != null); 813 assert(builder != null);
814 } 814 }
815 815
816 RenderObjectWithChildMixin<RenderBox> _container; 816 RenderObjectWithChildMixin<RenderBox> _container;
817 RenderObjectWithChildMixin<RenderBox> get container => _container; 817 RenderObjectWithChildMixin<RenderBox> get container => _container;
818 void set container(RenderObjectWithChildMixin<RenderBox> value) { 818 void set container(RenderObjectWithChildMixin<RenderBox> value) {
819 if (_container != value) { 819 if (_container != value) {
(...skipping 16 matching lines...) Expand all
836 super._buildIfDirty(); 836 super._buildIfDirty();
837 if (root.parent == null) { 837 if (root.parent == null) {
838 // we haven't attached it yet 838 // we haven't attached it yet
839 assert(_container.child == null); 839 assert(_container.child == null);
840 _container.child = root; 840 _container.child = root;
841 } 841 }
842 assert(root.parent == _container); 842 assert(root.parent == _container);
843 } 843 }
844 844
845 UINode build() => builder(); 845 UINode build() => builder();
846 } 846 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/basic.dart ('k') | sky/tests/raw/sector_layout.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698