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

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

Issue 1179713004: Material and RaisedButton. (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
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.dart'; 10 import '../app.dart';
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 class UINodeAppView extends AppView { 748 class UINodeAppView extends AppView {
749 749
750 UINodeAppView({ RenderView renderViewOverride: null }) 750 UINodeAppView({ RenderView renderViewOverride: null })
751 : super(renderViewOverride: renderViewOverride) { 751 : super(renderViewOverride: renderViewOverride) {
752 assert(_appView == null); 752 assert(_appView == null);
753 } 753 }
754 754
755 static UINodeAppView _appView; 755 static UINodeAppView _appView;
756 static AppView get appView => _appView; 756 static AppView get appView => _appView;
757 static void initUINodeAppView({ RenderView renderViewOverride: null }) { 757 static void initUINodeAppView({ RenderView renderViewOverride: null }) {
758 _appView = new UINodeAppView(renderViewOverride: renderViewOverride); 758 if (_appView == null)
759 _appView = new UINodeAppView(renderViewOverride: renderViewOverride);
759 } 760 }
760 761
761 void dispatchEvent(sky.Event event, HitTestResult result) { 762 void dispatchEvent(sky.Event event, HitTestResult result) {
762 assert(_appView == this); 763 assert(_appView == this);
763 super.dispatchEvent(event, result); 764 super.dispatchEvent(event, result);
764 for (HitTestEntry entry in result.path.reversed) { 765 for (HitTestEntry entry in result.path.reversed) {
765 UINode target = RenderObjectWrapper._getMounted(entry.target); 766 UINode target = RenderObjectWrapper._getMounted(entry.target);
766 if (target == null) 767 if (target == null)
767 continue; 768 continue;
768 RenderObject targetRoot = target.root; 769 RenderObject targetRoot = target.root;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 // we haven't attached it yet 851 // we haven't attached it yet
851 assert(_container.child == null); 852 assert(_container.child == null);
852 _container.child = root; 853 _container.child = root;
853 } 854 }
854 assert(root.parent == _container); 855 assert(root.parent == _container);
855 } 856 }
856 857
857 UINode build() => builder(); 858 UINode build() => builder();
858 859
859 } 860 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/widgets/tool_bar.dart ('k') | sky/sdk/lib/framework/widgets/wrappers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698