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

Side by Side Diff: pkg/observe/lib/src/change_notifier.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 | « no previous file | pkg/observe/lib/src/observable.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 observe; 5 part of observe;
6 6
7 /** 7 /**
8 * Base class implementing [Observable] object that performs its own change 8 * Base class implementing [Observable] object that performs its own change
9 * notifications, and does not need to be considered by [Observable.dirtyCheck]. 9 * notifications, and does not need to be considered by [Observable.dirtyCheck].
10 * 10 *
11 * When a field, property, or indexable item is changed, a derived class should 11 * When a field, property, or indexable item is changed, a derived class should
12 * call [notifyPropertyChange]. See that method for an example. 12 * call [notifyPropertyChange]. See that method for an example.
13 */ 13 */
14 typedef ChangeNotifierBase = Object with ChangeNotifierMixin; 14 class ChangeNotifierBase = Object with ChangeNotifierMixin;
15 15
16 /** 16 /**
17 * Mixin implementing [Observable] object that performs its own change 17 * Mixin implementing [Observable] object that performs its own change
18 * notifications, and does not need to be considered by [Observable.dirtyCheck]. 18 * notifications, and does not need to be considered by [Observable.dirtyCheck].
19 * 19 *
20 * When a field, property, or indexable item is changed, a derived class should 20 * When a field, property, or indexable item is changed, a derived class should
21 * call [notifyPropertyChange]. See that method for an example. 21 * call [notifyPropertyChange]. See that method for an example.
22 */ 22 */
23 abstract class ChangeNotifierMixin implements Observable { 23 abstract class ChangeNotifierMixin implements Observable {
24 StreamController _changes; 24 StreamController _changes;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void notifyChange(ChangeRecord record) { 82 void notifyChange(ChangeRecord record) {
83 if (!hasObservers) return; 83 if (!hasObservers) return;
84 84
85 if (_records == null) { 85 if (_records == null) {
86 _records = []; 86 _records = [];
87 scheduleMicrotask(deliverChanges); 87 scheduleMicrotask(deliverChanges);
88 } 88 }
89 _records.add(record); 89 _records.add(record);
90 } 90 }
91 } 91 }
OLDNEW
« no previous file with comments | « no previous file | pkg/observe/lib/src/observable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698