Index: client/html/frog/html_frog.dart |
diff --git a/client/html/frog/html_frog.dart b/client/html/frog/html_frog.dart |
index fdc95a27c0b1d2cd74df062ade6ef3e103823d77..bc59652949a1ba3e06436edc6bf1d0de9c374e4d 100644 |
--- a/client/html/frog/html_frog.dart |
+++ b/client/html/frog/html_frog.dart |
@@ -55,6 +55,7 @@ _DocumentImpl get _document() native "return window.document.documentElement;"; |
// Dart issue 1990. |
class _HTMLElementImpl extends _ElementImpl native "*HTMLElement" { |
} |
+ |
class _AbstractWorkerImpl extends _EventTargetImpl implements AbstractWorker native "*AbstractWorker" { |
_AbstractWorkerEventsImpl get on() => |
@@ -15516,6 +15517,194 @@ class _XSLTProcessorImpl implements XSLTProcessor native "*XSLTProcessor" { |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
+class _AudioElementFactoryProvider { |
+ factory AudioElement([String src = null]) native ''' |
+ if (src == null) return new Audio(); |
+ return new Audio(src); |
+ '''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _BlobBuilderFactoryProvider { |
+ factory BlobBuilder() native |
+ '''return new BlobBuilder();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _CSSMatrixFactoryProvider { |
+ factory CSSMatrix([String cssValue = '']) native |
+ 'return new WebKitCSSMatrix(cssValue);'; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _DOMParserFactoryProvider { |
+ factory DOMParser() native |
+ '''return new DOMParser();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _DOMURLFactoryProvider { |
+ factory DOMURL() native |
+ '''return new DOMURL();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _EventSourceFactoryProvider { |
+ factory EventSource(String scriptUrl) native |
+ '''return new EventSource(scriptUrl);'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _FileReaderFactoryProvider { |
+ factory FileReader() native |
+ '''return new FileReader();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _FileReaderSyncFactoryProvider { |
+ factory FileReaderSync() native |
+ '''return new FileReaderSync();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _MediaControllerFactoryProvider { |
+ factory MediaController() native |
+ '''return new MediaController();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _MediaStreamFactoryProvider { |
+ factory MediaStream(MediaStreamTrackList audioTracks, MediaStreamTrackList videoTracks) native |
+ '''return new MediaStream(audioTracks, videoTracks);'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _MessageChannelFactoryProvider { |
+ factory MessageChannel() native |
+ '''return new MessageChannel();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _OptionElementFactoryProvider { |
+ factory OptionElement([String data = null, String value = null, |
+ bool defaultSelected = null, bool selected = null]) |
+ native ''' |
+ if (data == null) return new Option(); |
+ if (value == null) return new Option(data); |
+ if (defaultSelected == null) return new Option(data, value); |
+ if (selected == null) return new Option(data, value, defaultSelected); |
+ return new Option(data, value, defaultSelected, selected); |
+ '''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _PeerConnectionFactoryProvider { |
+ factory PeerConnection(String serverConfiguration, SignalingCallback signalingCallback) native |
+ '''return new PeerConnection(serverConfiguration, signalingCallback);'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _ShadowRootFactoryProvider { |
+ factory ShadowRoot(Element host) native |
+ '''return new ShadowRoot(host);'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _SharedWorkerFactoryProvider { |
+ factory SharedWorker(String scriptURL, [String name]) native ''' |
+ if (name == null) return new SharedWorker(scriptURL); |
+ return new SharedWorker(scriptURL, name); |
+ '''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _TextTrackCueFactoryProvider { |
+ factory TextTrackCue(String id, num startTime, num endTime, String text, |
+ [String settings, bool pauseOnExit]) native ''' |
+ if (settings == null) |
+ return new TextTrackCue(id, startTime, endTime, text); |
+ if (pauseOnExit == null) |
+ return new TextTrackCue(id, startTime, endTime, text, settings); |
+ return new TextTrackCue(id, startTime, endTime, text, settings, pauseOnExit); |
+ '''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _WorkerFactoryProvider { |
+ factory Worker(String scriptUrl) native |
+ '''return new Worker(scriptUrl);'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _XMLHttpRequestFactoryProvider { |
+ factory XMLHttpRequest() native 'return new XMLHttpRequest();'; |
+ |
+ factory XMLHttpRequest.getTEMPNAME(String url, |
+ onSuccess(XMLHttpRequest request)) => |
+ _XMLHttpRequestUtils.getTEMPNAME(url, onSuccess); |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _XMLSerializerFactoryProvider { |
+ factory XMLSerializer() native |
+ '''return new XMLSerializer();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _XPathEvaluatorFactoryProvider { |
+ factory XPathEvaluator() native |
+ '''return new XPathEvaluator();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class _XSLTProcessorFactoryProvider { |
+ factory XSLTProcessor() native |
+ '''return new XSLTProcessor();'''; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
// WARNING: Do not edit - generated code. |
interface AbstractWorker extends EventTarget { |
@@ -15896,7 +16085,9 @@ interface AudioDestinationNode extends AudioNode { |
// WARNING: Do not edit - generated code. |
-interface AudioElement extends MediaElement { |
+interface AudioElement extends MediaElement default _AudioElementFactoryProvider { |
+ |
+ AudioElement([String src]); |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -16160,7 +16351,9 @@ interface Blob { |
// WARNING: Do not edit - generated code. |
-interface BlobBuilder { |
+interface BlobBuilder default _BlobBuilderFactoryProvider { |
+ |
+ BlobBuilder(); |
void append(var arrayBuffer_OR_blob_OR_value, [String endings]); |
@@ -16335,7 +16528,9 @@ interface CSSKeyframesRule extends CSSRule { |
// WARNING: Do not edit - generated code. |
-interface CSSMatrix { |
+interface CSSMatrix default _CSSMatrixFactoryProvider { |
+ |
+ CSSMatrix([String cssValue]); |
num a; |
@@ -19202,7 +19397,9 @@ interface DOMMimeTypeArray { |
// WARNING: Do not edit - generated code. |
-interface DOMParser { |
+interface DOMParser default _DOMParserFactoryProvider { |
+ |
+ DOMParser(); |
Document parseFromString(String str, String contentType); |
} |
@@ -19340,7 +19537,9 @@ interface DOMTokenList { |
// WARNING: Do not edit - generated code. |
-interface DOMURL { |
+interface DOMURL default _DOMURLFactoryProvider { |
+ |
+ DOMURL(); |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -20636,7 +20835,9 @@ interface EventException { |
// WARNING: Do not edit - generated code. |
-interface EventSource extends EventTarget { |
+interface EventSource extends EventTarget default _EventSourceFactoryProvider { |
+ |
+ EventSource(String scriptUrl); |
static final int CLOSED = 2; |
@@ -20859,7 +21060,9 @@ interface FileList { |
// WARNING: Do not edit - generated code. |
-interface FileReader { |
+interface FileReader default _FileReaderFactoryProvider { |
+ |
+ FileReader(); |
static final int DONE = 2; |
@@ -20907,7 +21110,9 @@ interface FileReader { |
// WARNING: Do not edit - generated code. |
-interface FileReaderSync { |
+interface FileReaderSync default _FileReaderSyncFactoryProvider { |
+ |
+ FileReaderSync(); |
ArrayBuffer readAsArrayBuffer(Blob blob); |
@@ -22225,7 +22430,9 @@ interface MarqueeElement extends Element { |
// WARNING: Do not edit - generated code. |
-interface MediaController { |
+interface MediaController default _MediaControllerFactoryProvider { |
+ |
+ MediaController(); |
final TimeRanges buffered; |
@@ -22455,7 +22662,9 @@ interface MediaQueryListListener { |
// WARNING: Do not edit - generated code. |
-interface MediaStream { |
+interface MediaStream default _MediaStreamFactoryProvider { |
+ |
+ MediaStream(MediaStreamTrackList audioTracks, MediaStreamTrackList videoTracks); |
static final int ENDED = 2; |
@@ -22555,7 +22764,9 @@ interface MenuElement extends Element { |
// WARNING: Do not edit - generated code. |
-interface MessageChannel { |
+interface MessageChannel default _MessageChannelFactoryProvider { |
+ |
+ MessageChannel(); |
final MessagePort port1; |
@@ -23249,7 +23460,9 @@ interface OptGroupElement extends Element { |
// WARNING: Do not edit - generated code. |
-interface OptionElement extends Element { |
+interface OptionElement extends Element default _OptionElementFactoryProvider { |
+ |
+ OptionElement([String data, String value, bool defaultSelected, bool selected]); |
bool defaultSelected; |
@@ -23359,7 +23572,9 @@ interface ParamElement extends Element { |
// WARNING: Do not edit - generated code. |
-interface PeerConnection { |
+interface PeerConnection default _PeerConnectionFactoryProvider { |
+ |
+ PeerConnection(String serverConfiguration, SignalingCallback signalingCallback); |
static final int ACTIVE = 2; |
@@ -26702,7 +26917,9 @@ interface ShadowElement extends Element { |
// WARNING: Do not edit - generated code. |
-interface ShadowRoot extends DocumentFragment { |
+interface ShadowRoot extends DocumentFragment default _ShadowRootFactoryProvider { |
+ |
+ ShadowRoot(Element host); |
final Element host; |
@@ -26720,7 +26937,9 @@ interface ShadowRoot extends DocumentFragment { |
// WARNING: Do not edit - generated code. |
-interface SharedWorker extends AbstractWorker { |
+interface SharedWorker extends AbstractWorker default _SharedWorkerFactoryProvider { |
+ |
+ SharedWorker(String scriptURL, [String name]); |
final MessagePort port; |
} |
@@ -27257,7 +27476,9 @@ interface TextTrack { |
// WARNING: Do not edit - generated code. |
-interface TextTrackCue { |
+interface TextTrackCue default _TextTrackCueFactoryProvider { |
+ |
+ TextTrackCue(String id, num startTime, num endTime, String text, [String settings, bool pauseOnExit]); |
String alignment; |
@@ -29227,7 +29448,9 @@ interface WindowEvents extends Events { |
// WARNING: Do not edit - generated code. |
-interface Worker extends AbstractWorker { |
+interface Worker extends AbstractWorker default _WorkerFactoryProvider { |
+ |
+ Worker(String scriptUrl); |
WorkerEvents get on(); |
@@ -29347,13 +29570,12 @@ interface WorkerNavigator { |
// WARNING: Do not edit - generated code. |
interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvider { |
- |
- XMLHttpRequest(); |
- |
// TODO(rnystrom): This name should just be "get" which is valid in Dart, but |
// not correctly implemented yet. (b/4970173) |
XMLHttpRequest.getTEMPNAME(String url, onSuccess(XMLHttpRequest request)); |
+ XMLHttpRequest(); |
+ |
static final int DONE = 4; |
static final int HEADERS_RECEIVED = 2; |
@@ -29494,7 +29716,9 @@ interface XMLHttpRequestUploadEvents extends Events { |
// WARNING: Do not edit - generated code. |
-interface XMLSerializer { |
+interface XMLSerializer default _XMLSerializerFactoryProvider { |
+ |
+ XMLSerializer(); |
String serializeToString(Node node); |
} |
@@ -29504,7 +29728,9 @@ interface XMLSerializer { |
// WARNING: Do not edit - generated code. |
-interface XPathEvaluator { |
+interface XPathEvaluator default _XPathEvaluatorFactoryProvider { |
+ |
+ XPathEvaluator(); |
XPathExpression createExpression(String expression, XPathNSResolver resolver); |
@@ -29604,7 +29830,9 @@ interface XPathResult { |
// WARNING: Do not edit - generated code. |
-interface XSLTProcessor { |
+interface XSLTProcessor default _XSLTProcessorFactoryProvider { |
+ |
+ XSLTProcessor(); |
void clearParameters(); |
@@ -30250,6 +30478,35 @@ class _Collections { |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
+class _XMLHttpRequestUtils { |
+ |
+ // Helper for factory XMLHttpRequest.getTEMPNAME |
+ static XMLHttpRequest getTEMPNAME(String url, |
+ onSuccess(XMLHttpRequest request)) { |
+ final request = new XMLHttpRequest(); |
+ request.open('GET', url, true); |
+ |
+ // TODO(terry): Validate after client login added if necessary to forward |
+ // cookies to server. |
+ request.withCredentials = true; |
+ |
+ // Status 0 is for local XHR request. |
+ request.on.readyStateChange.add((e) { |
+ if (request.readyState == XMLHttpRequest.DONE && |
+ (request.status == 200 || request.status == 0)) { |
+ onSuccess(request); |
+ } |
+ }); |
+ |
+ request.send(); |
+ |
+ return request; |
+ } |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
typedef Object ComputeValue(); |
class _MeasurementRequest<T> { |
@@ -30480,16 +30737,6 @@ class _AudioContextFactoryProvider { |
'''; |
} |
-class _DOMParserFactoryProvider { |
- |
- factory DOMParser() native 'return new DOMParser();'; |
-} |
- |
-class _FileReaderFactoryProvider { |
- |
- factory FileReader() native 'return new FileReader();'; |
-} |
- |
class _TypedArrayFactoryProvider { |
factory Float32Array(int length) => _F32(length); |
@@ -30541,47 +30788,10 @@ class _TypedArrayFactoryProvider { |
static ensureNative(List list) => list; // TODO: make sure. |
} |
-class _CSSMatrixFactoryProvider { |
- |
- factory CSSMatrix([String spec = '']) native |
- 'return new WebKitCSSMatrix(spec);'; |
-} |
- |
class _PointFactoryProvider { |
factory Point(num x, num y) native 'return new WebKitPoint(x, y);'; |
} |
- |
-class _WebSocketFactoryProvider { |
- |
- factory WebSocket(String url) native 'return new WebSocket(url);'; |
-} |
- |
-class _XMLHttpRequestFactoryProvider { |
- factory XMLHttpRequest() native 'return new XMLHttpRequest();'; |
- |
- factory XMLHttpRequest.getTEMPNAME(String url, |
- onSuccess(XMLHttpRequest request)) { |
- final request = new XMLHttpRequest(); |
- request.open('GET', url, true); |
- |
- // TODO(terry): Validate after client login added if necessary to forward |
- // cookies to server. |
- request.withCredentials = true; |
- |
- // Status 0 is for local XHR request. |
- request.on.readyStateChange.add((e) { |
- if (request.readyState == XMLHttpRequest.DONE && |
- (request.status == 200 || request.status == 0)) { |
- onSuccess(request); |
- } |
- }); |
- |
- request.send(); |
- |
- return request; |
- } |
-} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |