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

Unified Diff: pkg/observe/lib/src/observable.dart

Issue 20886002: add custom_element package (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/mdv/test/analyzer_test.dart ('k') | pkg/observe/lib/src/observable_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/src/observable.dart
diff --git a/pkg/observe/lib/src/observable.dart b/pkg/observe/lib/src/observable.dart
index a49f8f12a8dbd779a64d795eb752e201e7c2892b..7610a0f21e176a7104f50783f28d20726b9201b7 100644
--- a/pkg/observe/lib/src/observable.dart
+++ b/pkg/observe/lib/src/observable.dart
@@ -63,6 +63,12 @@ abstract class Observable {
void notifyChange(ChangeRecord record);
/**
+ * True if this object has any observers, and should call
+ * [notifyChange] for changes.
+ */
+ bool get hasObservers;
+
+ /**
* Performs dirty checking of objects that inherit from [ObservableMixin].
* This scans all observed objects using mirrors and determines if any fields
* have changed. If they have, it delivers the changes for the object.
@@ -99,10 +105,6 @@ abstract class ObservableMixin implements Observable {
return _changes.stream;
}
- /**
- * True if this object has any observers, and should call
- * [notifyPropertyChange] for changes.
- */
bool get hasObservers => _changes != null && _changes.hasListener;
void _observed() {
« no previous file with comments | « pkg/mdv/test/analyzer_test.dart ('k') | pkg/observe/lib/src/observable_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698