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

Side by Side Diff: pkg/polymer/lib/src/instance.dart

Issue 27618002: package:observe fix various api issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/src/build/runner.dart ('k') | pkg/polymer/test/build/all_phases_test.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of polymer; 5 part of polymer;
6 6
7 /** 7 /**
8 * Use this annotation to publish a field as an attribute. For example: 8 * Use this annotation to publish a field as an attribute. For example:
9 * 9 *
10 * class MyPlaybackElement extends PolymerElement { 10 * class MyPlaybackElement extends PolymerElement {
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 super.close(); 891 super.close();
892 } 892 }
893 893
894 void boundValueChanged(newValue) { 894 void boundValueChanged(newValue) {
895 _lastValue = newValue; 895 _lastValue = newValue;
896 _target.setField(_property, newValue); 896 _target.setField(_property, newValue);
897 } 897 }
898 898
899 void _propertyValueChanged(List<ChangeRecord> records) { 899 void _propertyValueChanged(List<ChangeRecord> records) {
900 for (var record in records) { 900 for (var record in records) {
901 if (record.changes(_property)) { 901 if (record is PropertyChangeRecord && record.name == _property) {
902 final newValue = _target.getField(_property).reflectee; 902 final newValue = _target.getField(_property).reflectee;
903 if (!identical(_lastValue, newValue)) { 903 if (!identical(_lastValue, newValue)) {
904 value = newValue; 904 value = newValue;
905 } 905 }
906 return; 906 return;
907 } 907 }
908 } 908 }
909 } 909 }
910 } 910 }
911 911
(...skipping 23 matching lines...) Expand all
935 935
936 final Expando _shadowHost = new Expando<Polymer>(); 936 final Expando _shadowHost = new Expando<Polymer>();
937 937
938 final Expando _eventHandledTable = new Expando<Set<Node>>(); 938 final Expando _eventHandledTable = new Expando<Set<Node>>();
939 939
940 /** 940 /**
941 * Base class for PolymerElements deriving from HtmlElement. 941 * Base class for PolymerElements deriving from HtmlElement.
942 * 942 *
943 * See [Polymer]. 943 * See [Polymer].
944 */ 944 */
945 class PolymerElement extends HtmlElement with Polymer, ObservableMixin { 945 class PolymerElement extends HtmlElement with Polymer, Observable {
946 PolymerElement.created() : super.created() { 946 PolymerElement.created() : super.created() {
947 polymerCreated(); 947 polymerCreated();
948 } 948 }
949 } 949 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/build/runner.dart ('k') | pkg/polymer/test/build/all_phases_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698