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

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

Issue 201483002: Cleanup for pkg/observe and pkg/polymer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/pubspec.yaml » ('j') | pkg/observe/pubspec.yaml » ('J')
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 library observe.src.path_observer; 5 library observe.src.path_observer;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:math' show min; 9 import 'dart:math' show min;
10 @MirrorsUsed(metaTargets: const [Reflectable, ObservableProperty], 10 @MirrorsUsed(metaTargets: const [Reflectable, ObservableProperty],
11 override: 'smoke.mirrors') 11 override: 'smoke.mirrors')
12 import 'dart:mirrors' show MirrorsUsed; 12 import 'dart:mirrors' show MirrorsUsed;
13 13
14 import 'package:logging/logging.dart' show Logger, Level; 14 import 'package:logging/logging.dart' show Logger, Level;
15 import 'package:observe/observe.dart'; 15 import 'package:observe/observe.dart';
16 import 'package:observe/src/observable.dart' show objectType;
17 import 'package:smoke/smoke.dart' as smoke; 16 import 'package:smoke/smoke.dart' as smoke;
18 17
19 /// A data-bound path starting from a view-model or model object, for example 18 /// A data-bound path starting from a view-model or model object, for example
20 /// `foo.bar.baz`. 19 /// `foo.bar.baz`.
21 /// 20 ///
22 /// When [open] is called, this will observe changes to the object and any 21 /// When [open] is called, this will observe changes to the object and any
23 /// intermediate object along the path, and send updated values accordingly. 22 /// intermediate object along the path, and send updated values accordingly.
24 /// When [close] is called it will stop observing the objects. 23 /// When [close] is called it will stop observing the objects.
25 /// 24 ///
26 /// This class is used to implement `Node.bind` and similar functionality in 25 /// This class is used to implement `Node.bind` and similar functionality in
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 for (var observer in _observers.values.toList(growable: false)) { 655 for (var observer in _observers.values.toList(growable: false)) {
657 if (observer._isOpen) observer._check(); 656 if (observer._isOpen) observer._check();
658 } 657 }
659 658
660 _resetNeeded = true; 659 _resetNeeded = true;
661 scheduleMicrotask(reset); 660 scheduleMicrotask(reset);
662 } 661 }
663 } 662 }
664 663
665 const int _MAX_DIRTY_CHECK_CYCLES = 1000; 664 const int _MAX_DIRTY_CHECK_CYCLES = 1000;
OLDNEW
« no previous file with comments | « no previous file | pkg/observe/pubspec.yaml » ('j') | pkg/observe/pubspec.yaml » ('J')

Powered by Google App Engine
This is Rietveld 408576698