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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 16125005: Make new StreamController be async by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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:
Download patch
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 0d36c931f28270df76d6aabcbdbb89b3cd479411..36dd533ea4b7629bdfa476df1f6a047f5575055d 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -6511,14 +6511,14 @@ class DialogElement extends _Element_Merged {
// http://www.w3.org/TR/file-system-api/#the-directoryentry-interface
@Experimental
class DirectoryEntry extends Entry {
-
+
/**
* Create a new directory with the specified `path`. If `exclusive` is true,
* the returned Future will complete with an error if a directory already
* exists with the specified `path`.
*/
Future<Entry> createDirectory(String path, {bool exclusive: false}) {
- return _getDirectory(path, options:
+ return _getDirectory(path, options:
{'create': true, 'exclusive': exclusive});
}
@@ -6539,7 +6539,7 @@ class DirectoryEntry extends Entry {
Future<Entry> createFile(String path, {bool exclusive: false}) {
return _getFile(path, options: {'create': true, 'exclusive': exclusive});
}
-
+
/**
* Retrieve an already existing file entry. The returned future will
* result in an error if a file at `path` does not exist or if the item at
@@ -6672,7 +6672,7 @@ class DivElement extends _Element_Merged {
* [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connect-dart-html/).
*/
@DomName('Document')
-class Document extends Node
+class Document extends Node
{
Document.internal() : super.internal();
@@ -11067,7 +11067,7 @@ class Geolocation extends NativeFieldWrapperClass1 {
int watchId;
var controller;
- controller = new StreamController<Geoposition>(
+ controller = new StreamController<Geoposition>(sync: true,
onListen: () {
assert(watchId == null);
watchId = $dom_watchPosition(
@@ -16439,18 +16439,18 @@ class Navigator extends NativeFieldWrapperClass1 {
* document.body.append(video);
* });
*
- * The user can also pass in Maps to the audio or video parameters to specify
- * mandatory and optional constraints for the media stream. Not passing in a
- * map, but passing in `true` will provide a MediaStream with audio or
+ * The user can also pass in Maps to the audio or video parameters to specify
+ * mandatory and optional constraints for the media stream. Not passing in a
+ * map, but passing in `true` will provide a MediaStream with audio or
* video capabilities, but without any additional constraints. The particular
- * constraint names for audio and video are still in flux, but as of this
+ * constraint names for audio and video are still in flux, but as of this
* writing, here is an example providing more constraints.
*
* window.navigator.getUserMedia(
- * audio: true,
- * video: {'mandatory':
+ * audio: true,
+ * video: {'mandatory':
* { 'minAspectRatio': 1.333, 'maxAspectRatio': 1.334 },
- * 'optional':
+ * 'optional':
* [{ 'minFrameRate': 60 },
* { 'maxWidth': 640 }]
* });
@@ -17296,7 +17296,7 @@ class Notation extends Node {
@Experimental // experimental
class Notification extends EventTarget {
- factory Notification(String title, {String titleDir: null, String body: null,
+ factory Notification(String title, {String titleDir: null, String body: null,
String bodyDir: null, String tag: null, String iconUrl: null}) {
var parsedOptions = {};
@@ -21396,8 +21396,8 @@ class StorageInfo extends NativeFieldWrapperClass1 {
Future<StorageInfoUsage> queryUsageAndQuota(int storageType) {
var completer = new Completer<StorageInfoUsage>();
_queryUsageAndQuota(storageType,
- (currentUsageInBytes, currentQuotaInBytes) {
- completer.complete(new StorageInfoUsage(currentUsageInBytes,
+ (currentUsageInBytes, currentQuotaInBytes) {
+ completer.complete(new StorageInfoUsage(currentUsageInBytes,
currentQuotaInBytes));
},
(error) { completer.completeError(error); });
@@ -21405,7 +21405,7 @@ class StorageInfo extends NativeFieldWrapperClass1 {
}
}
-/**
+/**
* A simple container class for the two values that are returned from the
* futures in requestQuota and queryUsageAndQuota.
*/
@@ -21916,7 +21916,7 @@ class TemplateElement extends _Element_Merged {
@Experimental
static Stream<DocumentFragment> get instanceCreated {
if (_instanceCreated == null) {
- _instanceCreated = new StreamController<DocumentFragment>();
+ _instanceCreated = new StreamController<DocumentFragment>(sync: true);
}
return _instanceCreated.stream;
}
@@ -24788,7 +24788,7 @@ class _BeforeUnloadEventStreamProvider implements
const _BeforeUnloadEventStreamProvider(this._eventType);
Stream<BeforeUnloadEvent> forTarget(EventTarget e, {bool useCapture: false}) {
- var controller = new StreamController();
+ var controller = new StreamController(sync: true);
var stream = new _EventStream(e, _eventType, useCapture);
stream.listen((event) {
var wrapped = new _BeforeUnloadEvent(event);
@@ -27509,7 +27509,7 @@ class _KeyboardEventHandler extends EventStreamProvider<KeyEvent> {
static final int _ROMAN_ALPHABET_OFFSET = "a".codeUnits[0] - "A".codeUnits[0];
/** Controller to produce KeyEvents for the stream. */
- final StreamController _controller = new StreamController();
+ final StreamController _controller = new StreamController(sync: true);
static const _EVENT_TYPE = 'KeyEvent';
@@ -27578,7 +27578,7 @@ class _KeyboardEventHandler extends EventStreamProvider<KeyEvent> {
* Hook up all event listeners under the covers so we can estimate keycodes
* and charcodes when they are not provided.
*/
- _KeyboardEventHandler.initializeAllEventListeners(this._type, this._target) :
+ _KeyboardEventHandler.initializeAllEventListeners(this._type, this._target) :
super(_EVENT_TYPE) {
Element.keyDownEvent.forTarget(_target, useCapture: true).listen(
processKeyDown);
@@ -28723,7 +28723,8 @@ class PathObserver {
// TODO(jmesserly): if the path is empty, or the object is! Observable, we
// can optimize the PathObserver to be more lightweight.
- _values = new StreamController.broadcast(onListen: _observe,
+ _values = new StreamController.broadcast(sync: true,
+ onListen: _observe,
onCancel: _unobserve);
if (_isValid) {
@@ -30849,7 +30850,7 @@ class FixedSizeListIterator<T> implements Iterator<T> {
final int _length; // Cache array length for faster access.
int _position;
T _current;
-
+
FixedSizeListIterator(List<T> array)
: _array = array,
_position = -1,

Powered by Google App Engine
This is Rietveld 408576698