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

Side by Side Diff: pkg/observe/lib/src/observable.dart

Issue 27300003: Change "typedef" to "class" in core library and related tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update some dart2js tests and unparser. 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/observe/lib/src/change_notifier.dart ('k') | runtime/vm/class_finalizer.cc » ('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 observe; 5 part of observe;
6 6
7 /** 7 /**
8 * Interface representing an observable object. This is used by data in 8 * Interface representing an observable object. This is used by data in
9 * model-view architectures to notify interested parties of [changes]. 9 * model-view architectures to notify interested parties of [changes].
10 * 10 *
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 */ 70 */
71 static void dirtyCheck() => dirtyCheckObservables(); 71 static void dirtyCheck() => dirtyCheckObservables();
72 } 72 }
73 73
74 /** 74 /**
75 * Base class implementing [Observable]. 75 * Base class implementing [Observable].
76 * 76 *
77 * When a field, property, or indexable item is changed, the change record 77 * When a field, property, or indexable item is changed, the change record
78 * will be sent to [changes]. 78 * will be sent to [changes].
79 */ 79 */
80 typedef ObservableBase = Object with ObservableMixin; 80 class ObservableBase = Object with ObservableMixin;
81 81
82 /** 82 /**
83 * Mixin for implementing [Observable] objects. 83 * Mixin for implementing [Observable] objects.
84 * 84 *
85 * When a field, property, or indexable item is changed, the change record 85 * When a field, property, or indexable item is changed, the change record
86 * will be sent to [changes]. 86 * will be sent to [changes].
87 */ 87 */
88 abstract class ObservableMixin implements Observable { 88 abstract class ObservableMixin implements Observable {
89 StreamController _changes; 89 StreamController _changes;
90 InstanceMirror _mirror; 90 InstanceMirror _mirror;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 _notifyPropertyChange(Observable obj, Symbol field, Object oldValue, 205 _notifyPropertyChange(Observable obj, Symbol field, Object oldValue,
206 Object newValue) { 206 Object newValue) {
207 207
208 // TODO(jmesserly): should this be == instead of identical, to prevent 208 // TODO(jmesserly): should this be == instead of identical, to prevent
209 // spurious loops? 209 // spurious loops?
210 if (obj.hasObservers && !identical(oldValue, newValue)) { 210 if (obj.hasObservers && !identical(oldValue, newValue)) {
211 obj.notifyChange(new PropertyChangeRecord(field)); 211 obj.notifyChange(new PropertyChangeRecord(field));
212 } 212 }
213 return newValue; 213 return newValue;
214 } 214 }
OLDNEW
« no previous file with comments | « pkg/observe/lib/src/change_notifier.dart ('k') | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698