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

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

Issue 53743002: introduce ObservableList.listChanges to keep list changes separate from property changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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/observe/test/observe_test_utils.dart ('k') | pkg/polymer_expressions/lib/eval.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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 } 567 }
568 568
569 unregisterObserver('${MirrorSystem.getName(name)}__array'); 569 unregisterObserver('${MirrorSystem.getName(name)}__array');
570 } 570 }
571 // if the new value is an array, being observing it 571 // if the new value is an array, being observing it
572 if (value is ObservableList) { 572 if (value is ObservableList) {
573 if (_observeLog.isLoggable(Level.FINE)) { 573 if (_observeLog.isLoggable(Level.FINE)) {
574 _observeLog.fine('[$localName] observeArrayValue: register observer ' 574 _observeLog.fine('[$localName] observeArrayValue: register observer '
575 '$name'); 575 '$name');
576 } 576 }
577 var sub = (value as ObservableList).changes.listen((changes) { 577 var sub = value.listChanges.listen((changes) {
578 invokeMethod(callbackName, [old]); 578 invokeMethod(callbackName, [old]);
579 }); 579 });
580 registerObserver('${MirrorSystem.getName(name)}__array', sub); 580 registerObserver('${MirrorSystem.getName(name)}__array', sub);
581 } 581 }
582 } 582 }
583 583
584 bool unbindProperty(String name) => unregisterObserver(name); 584 bool unbindProperty(String name) => unregisterObserver(name);
585 585
586 void unbindAllProperties() { 586 void unbindAllProperties() {
587 if (_propertyObserver != null) { 587 if (_propertyObserver != null) {
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1073
1074 class _PropertyValue { 1074 class _PropertyValue {
1075 Object oldValue, newValue; 1075 Object oldValue, newValue;
1076 _PropertyValue(this.oldValue); 1076 _PropertyValue(this.oldValue);
1077 } 1077 }
1078 1078
1079 class _PolymerExpressionsWithEventDelegate extends PolymerExpressions { 1079 class _PolymerExpressionsWithEventDelegate extends PolymerExpressions {
1080 prepareBinding(String path, name, node) => 1080 prepareBinding(String path, name, node) =>
1081 Polymer.prepareBinding(path, name, node, super.prepareBinding); 1081 Polymer.prepareBinding(path, name, node, super.prepareBinding);
1082 } 1082 }
OLDNEW
« no previous file with comments | « pkg/observe/test/observe_test_utils.dart ('k') | pkg/polymer_expressions/lib/eval.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698