OLD | NEW |
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 class _AudioContextFactoryProvider { | 5 class _AudioContextFactoryProvider { |
6 | 6 |
7 factory AudioContext() { return create(); } | 7 factory AudioContext() { return create(); } |
8 | 8 |
9 static AudioContext create() native; | 9 static AudioContext create() native; |
10 } | 10 } |
11 | 11 |
12 class _DOMParserFactoryProvider { | 12 class _DOMParserFactoryProvider { |
13 | 13 |
14 factory DOMParser() { return create(); } | 14 factory DOMParser() { return create(); } |
15 | 15 |
16 static DOMParser create() native; | 16 static DOMParser create() native; |
17 } | 17 } |
18 | 18 |
| 19 class _EventSourceFactoryProvider { |
| 20 |
| 21 factory EventSource(String scriptUrl) { return create(scriptUrl); } |
| 22 |
| 23 static create(scriptUrl); |
| 24 } |
| 25 |
19 class _FileReaderFactoryProvider { | 26 class _FileReaderFactoryProvider { |
20 | 27 |
21 factory FileReader() { return create(); } | 28 factory FileReader() { return create(); } |
22 | 29 |
23 static FileReader create() native; | 30 static FileReader create() native; |
24 } | 31 } |
25 | 32 |
| 33 class _MediaStreamFactoryProvider { |
| 34 |
| 35 factory MediaStream(MediaStreamTrackList audioTracks, |
| 36 MediaStreamTrackList videoTracks) |
| 37 => create(audioTracks, videoTracks); |
| 38 |
| 39 static create(audioTracks, videoTracks) native; |
| 40 } |
| 41 |
| 42 class _PeerConnectionFactoryProvider { |
| 43 |
| 44 factory PeerConnection(String serverConfiguration, |
| 45 SignalingCallback signalingCallback) |
| 46 => create(serverConfiguration, signalingCallback); |
| 47 |
| 48 static create(serverConfiguration, signalingCallback) native; |
| 49 } |
| 50 |
| 51 class _ShadowRootFactoryProvider { |
| 52 |
| 53 factory ShadowRoot(Element host) => create(host); |
| 54 |
| 55 static create(host) native; |
| 56 } |
| 57 |
| 58 class _SharedWorkerFactoryProvider { |
| 59 |
| 60 factory SharedWorker(String scriptURL, [String name]) |
| 61 => create(scriptURL, name); |
| 62 |
| 63 static create(scriptURL, name) native; |
| 64 } |
| 65 |
| 66 class _TextTrackCueFactoryProvider { |
| 67 |
| 68 factory TextTrackCue(String id, num startTime, num endTime, String text, |
| 69 [String settings, bool pauseOnExit]) |
| 70 => create(id, startTime, endTime, text, settings, pauseOnExit); |
| 71 |
| 72 static create(id, startTime, endTime, text, settings, pauseOnExit); |
| 73 } |
| 74 |
26 class _TypedArrayFactoryProvider { | 75 class _TypedArrayFactoryProvider { |
27 | 76 |
28 factory Float32Array(int length) => _F32(length); | 77 factory Float32Array(int length) => _F32(length); |
29 factory Float32Array.fromList(List<num> list) => _F32(ensureNative(list)); | 78 factory Float32Array.fromList(List<num> list) => _F32(ensureNative(list)); |
30 factory Float32Array.fromBuffer(ArrayBuffer buffer) => _F32(buffer); | 79 factory Float32Array.fromBuffer(ArrayBuffer buffer) => _F32(buffer); |
31 | 80 |
32 factory Float64Array(int length) => _F64(length); | 81 factory Float64Array(int length) => _F64(length); |
33 factory Float64Array.fromList(List<num> list) => _F64(ensureNative(list)); | 82 factory Float64Array.fromList(List<num> list) => _F64(ensureNative(list)); |
34 factory Float64Array.fromBuffer(ArrayBuffer buffer) => _F64(buffer); | 83 factory Float64Array.fromBuffer(ArrayBuffer buffer) => _F64(buffer); |
35 | 84 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 static Uint8Array _U8(arg) native; | 118 static Uint8Array _U8(arg) native; |
70 static Uint16Array _U16(arg) native; | 119 static Uint16Array _U16(arg) native; |
71 static Uint32Array _U32(arg) native; | 120 static Uint32Array _U32(arg) native; |
72 static Uint8ClampedArray _U8C(arg) native; | 121 static Uint8ClampedArray _U8C(arg) native; |
73 | 122 |
74 static ensureNative(List list) => list; // TODO: make sure. | 123 static ensureNative(List list) => list; // TODO: make sure. |
75 } | 124 } |
76 | 125 |
77 class _WebKitCSSMatrixFactoryProvider { | 126 class _WebKitCSSMatrixFactoryProvider { |
78 | 127 |
79 factory WebKitCSSMatrix([String spec = '']) { return create(spec); } | 128 factory WebKitCSSMatrix([String cssValue = '']) { return create(cssValue); } |
80 | 129 |
81 static WebKitCSSMatrix create(spec) native; | 130 static WebKitCSSMatrix create(cssValue) native; |
82 } | 131 } |
83 | 132 |
84 class _WebKitPointFactoryProvider { | 133 class _WebKitPointFactoryProvider { |
85 | 134 |
86 factory WebKitPoint(num x, num y) { return create(x, y); } | 135 factory WebKitPoint(num x, num y) { return create(x, y); } |
87 | 136 |
88 static WebKitPoint create(x, y) native; | 137 static WebKitPoint create(x, y) native; |
89 } | 138 } |
90 | 139 |
91 class _WebSocketFactoryProvider { | 140 class _WebSocketFactoryProvider { |
92 | 141 |
93 factory WebSocket(String url) { return create(url); } | 142 factory WebSocket(String url) { return create(url); } |
94 | 143 |
95 static WebKitPoint create(url) native; | 144 static WebKitPoint create(url) native; |
96 } | 145 } |
97 | 146 |
| 147 class _WorkerFactoryProvider { |
| 148 |
| 149 factory Worker(String scriptUrl) { return create(scriptUrl); } |
| 150 |
| 151 static create(scriptUrl) native; |
| 152 } |
| 153 |
98 class _XMLHttpRequestFactoryProvider { | 154 class _XMLHttpRequestFactoryProvider { |
99 | 155 |
100 factory XMLHttpRequest() { return create(); } | 156 factory XMLHttpRequest() { return create(); } |
101 | 157 |
102 static XMLHttpRequest create() native; | 158 static XMLHttpRequest create() native; |
103 } | 159 } |
104 | 160 |
105 class _XSLTProcessorFactoryProvider { | 161 class _XSLTProcessorFactoryProvider { |
106 | 162 |
107 factory XSLTProcessor() { return create(); } | 163 factory XSLTProcessor() { return create(); } |
108 | 164 |
109 static XSLTProcessor create() native; | 165 static XSLTProcessor create() native; |
110 } | 166 } |
| 167 |
| 168 // TODO(sra): Fill in these: |
| 169 class _DOMURLFactoryProvider {} |
| 170 class _FileReaderSyncFactoryProvider {} |
| 171 class _MediaControllerFactoryProvider {} |
| 172 class _MessageChannelFactoryProvider {} |
| 173 class _WebKitBlobBuilderFactoryProvider {} |
| 174 class _XPathEvaluatorFactoryProvider {} |
| 175 class _XMLSerializerFactoryProvider {} |
OLD | NEW |