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

Side by Side Diff: lib/watcher.dart

Issue 55143003: webui fixes for 0.8.9 (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * A library to observe changes on Dart objects. 6 * A library to observe changes on Dart objects.
7 * 7 *
8 * Similar to the principle of watchers in AngularJS, this library provides the 8 * Similar to the principle of watchers in AngularJS, this library provides the
9 * mechanisms to observe and react to changes that happen in an application's 9 * mechanisms to observe and react to changes that happen in an application's
10 * data model. 10 * data model.
(...skipping 28 matching lines...) Expand all
39 * 39 *
40 * You can watch several kinds of expressions, including lists. See [watch] for 40 * You can watch several kinds of expressions, including lists. See [watch] for
41 * more details. 41 * more details.
42 * 42 *
43 * A common design pattern for MVC applications is to call [dispatch] at the end 43 * A common design pattern for MVC applications is to call [dispatch] at the end
44 * of each event loop (e.g. after each UI event is fired). Our view library does 44 * of each event loop (e.g. after each UI event is fired). Our view library does
45 * this automatically. 45 * this automatically.
46 */ 46 */
47 library watcher; 47 library watcher;
48 48
49 import 'dart:async';
50 import 'dart:collection' hide LinkedList, LinkedListEntry; 49 import 'dart:collection' hide LinkedList, LinkedListEntry;
51 import 'observe.dart'; 50 import 'observe.dart';
52 import 'src/linked_list.dart'; 51 import 'src/linked_list.dart';
53 import 'package:logging/logging.dart'; 52 import 'package:logging/logging.dart';
54 53
55 /** 54 /**
56 * True to use the [observe] library instead of watchers. 55 * True to use the [observe] library instead of watchers.
57 * 56 *
58 * Observers require the [observable] annotation on objects and for collection 57 * Observers require the [observable] annotation on objects and for collection
59 * types to be observable, such as [ObservableList]. But in return they offer 58 * types to be observable, such as [ObservableList]. But in return they offer
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 class _WatcherType { 470 class _WatcherType {
472 final _value; 471 final _value;
473 const _WatcherType._internal(this._value); 472 const _WatcherType._internal(this._value);
474 toString() => 'Enum.$_value'; 473 toString() => 'Enum.$_value';
475 474
476 static const LIST = const _WatcherType._internal('LIST'); 475 static const LIST = const _WatcherType._internal('LIST');
477 static const HASH_MAP = const _WatcherType._internal('HASH_MAP'); 476 static const HASH_MAP = const _WatcherType._internal('HASH_MAP');
478 static const ORDERED_MAP = const _WatcherType._internal('ORDERED_MAP'); 477 static const ORDERED_MAP = const _WatcherType._internal('ORDERED_MAP');
479 static const OTHER = const _WatcherType._internal('OTHER'); 478 static const OTHER = const _WatcherType._internal('OTHER');
480 } 479 }
OLDNEW
« no previous file with comments | « lib/testing/render_test.dart ('k') | lib/web_ui.dart » ('j') | pubspec.yaml » ('J')

Powered by Google App Engine
This is Rietveld 408576698