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

Side by Side Diff: sdk/lib/web_sql/dartium/web_sql_dartium.dart

Issue 259773004: Generate dart:blink in the SDK (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding dart:blink to SDK Created 6 years, 8 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 | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | tools/dom/scripts/dartdomgenerator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * An API for storing data in the browser that can be queried with SQL. 2 * An API for storing data in the browser that can be queried with SQL.
3 * 3 *
4 * **Caution:** this specification is no longer actively maintained by the Web 4 * **Caution:** this specification is no longer actively maintained by the Web
5 * Applications Working Group and may be removed at any time. 5 * Applications Working Group and may be removed at any time.
6 * See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase /) 6 * See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase /)
7 * for more information. 7 * for more information.
8 * 8 *
9 * The [dart:indexed_db] APIs is a recommended alternatives. 9 * The [dart:indexed_db] APIs is a recommended alternatives.
10 */ 10 */
11 library dart.dom.web_sql; 11 library dart.dom.web_sql;
12 12
13 import 'dart:async'; 13 import 'dart:async';
14 import 'dart:collection'; 14 import 'dart:collection';
15 import 'dart:_internal' hide deprecated; 15 import 'dart:_internal' hide deprecated;
16 import 'dart:html'; 16 import 'dart:html';
17 import 'dart:html_common'; 17 import 'dart:html_common';
18 import 'dart:nativewrappers'; 18 import 'dart:nativewrappers';
19 import 'dart:blink' as blink;
19 // DO NOT EDIT - unless you are editing documentation as per: 20 // DO NOT EDIT - unless you are editing documentation as per:
20 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation 21 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
21 // Auto-generated dart:audio library. 22 // Auto-generated dart:audio library.
22 23
23 24
24 25
25 26
26 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 27 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
27 // for details. All rights reserved. Use of this source code is governed by a 28 // for details. All rights reserved. Use of this source code is governed by a
28 // BSD-style license that can be found in the LICENSE file. 29 // BSD-style license that can be found in the LICENSE file.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 @Experimental() // deprecated 84 @Experimental() // deprecated
84 class SqlDatabase extends NativeFieldWrapperClass2 { 85 class SqlDatabase extends NativeFieldWrapperClass2 {
85 // To suppress missing implicit constructor warnings. 86 // To suppress missing implicit constructor warnings.
86 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } 87 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); }
87 88
88 /// Checks if this type is supported on the current platform. 89 /// Checks if this type is supported on the current platform.
89 static bool get supported => true; 90 static bool get supported => true;
90 91
91 @DomName('Database.version') 92 @DomName('Database.version')
92 @DocsEditable() 93 @DocsEditable()
93 String get version native "Database_version_Getter"; 94 String get version => blink.Native_Database_version_Getter(this);
94 95
95 /** 96 /**
96 * Atomically update the database version to [newVersion], asynchronously 97 * Atomically update the database version to [newVersion], asynchronously
97 * running [callback] on the [SqlTransaction] representing this 98 * running [callback] on the [SqlTransaction] representing this
98 * [changeVersion] transaction. 99 * [changeVersion] transaction.
99 * 100 *
100 * If [callback] runs successfully, then [successCallback] is called. 101 * If [callback] runs successfully, then [successCallback] is called.
101 * Otherwise, [errorCallback] is called. 102 * Otherwise, [errorCallback] is called.
102 * 103 *
103 * [oldVersion] should match the database's current [version] exactly. 104 * [oldVersion] should match the database's current [version] exactly.
104 * 105 *
105 * * [Database.changeVersion](http://www.w3.org/TR/webdatabase/#dom-database-c hangeversion) from W3C. 106 * * [Database.changeVersion](http://www.w3.org/TR/webdatabase/#dom-database-c hangeversion) from W3C.
106 */ 107 */
107 @DomName('Database.changeVersion') 108 @DomName('Database.changeVersion')
108 @DocsEditable() 109 @DocsEditable()
109 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall back]) native "Database_changeVersion_Callback"; 110 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall back]) => blink.Native_Database_changeVersion_Callback(this, oldVersion, newVers ion, callback, errorCallback, successCallback);
110 111
111 @DomName('Database.readTransaction') 112 @DomName('Database.readTransaction')
112 @DocsEditable() 113 @DocsEditable()
113 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall back errorCallback, VoidCallback successCallback]) native "Database_readTransact ion_Callback"; 114 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall back errorCallback, VoidCallback successCallback]) => blink.Native_Database_read Transaction_Callback(this, callback, errorCallback, successCallback);
114 115
115 @DomName('Database.transaction') 116 @DomName('Database.transaction')
116 @DocsEditable() 117 @DocsEditable()
117 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native "Database_transaction_Call back"; 118 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) => blink.Native_Database_transact ion_Callback(this, callback, errorCallback, successCallback);
118 119
119 } 120 }
120 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 121 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
121 // for details. All rights reserved. Use of this source code is governed by a 122 // for details. All rights reserved. Use of this source code is governed by a
122 // BSD-style license that can be found in the LICENSE file. 123 // BSD-style license that can be found in the LICENSE file.
123 124
124 // WARNING: Do not edit - generated code. 125 // WARNING: Do not edit - generated code.
125 126
126 127
127 @DocsEditable() 128 @DocsEditable()
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 @DomName('SQLError.UNKNOWN_ERR') 160 @DomName('SQLError.UNKNOWN_ERR')
160 @DocsEditable() 161 @DocsEditable()
161 static const int UNKNOWN_ERR = 0; 162 static const int UNKNOWN_ERR = 0;
162 163
163 @DomName('SQLError.VERSION_ERR') 164 @DomName('SQLError.VERSION_ERR')
164 @DocsEditable() 165 @DocsEditable()
165 static const int VERSION_ERR = 2; 166 static const int VERSION_ERR = 2;
166 167
167 @DomName('SQLError.code') 168 @DomName('SQLError.code')
168 @DocsEditable() 169 @DocsEditable()
169 int get code native "SQLError_code_Getter"; 170 int get code => blink.Native_SQLError_code_Getter(this);
170 171
171 @DomName('SQLError.message') 172 @DomName('SQLError.message')
172 @DocsEditable() 173 @DocsEditable()
173 String get message native "SQLError_message_Getter"; 174 String get message => blink.Native_SQLError_message_Getter(this);
174 175
175 } 176 }
176 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 177 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
177 // for details. All rights reserved. Use of this source code is governed by a 178 // for details. All rights reserved. Use of this source code is governed by a
178 // BSD-style license that can be found in the LICENSE file. 179 // BSD-style license that can be found in the LICENSE file.
179 180
180 // WARNING: Do not edit - generated code. 181 // WARNING: Do not edit - generated code.
181 182
182 183
183 @DocsEditable() 184 @DocsEditable()
184 @DomName('SQLResultSet') 185 @DomName('SQLResultSet')
185 // http://www.w3.org/TR/webdatabase/#sqlresultset 186 // http://www.w3.org/TR/webdatabase/#sqlresultset
186 @Experimental() // deprecated 187 @Experimental() // deprecated
187 class SqlResultSet extends NativeFieldWrapperClass2 { 188 class SqlResultSet extends NativeFieldWrapperClass2 {
188 // To suppress missing implicit constructor warnings. 189 // To suppress missing implicit constructor warnings.
189 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } 190 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); }
190 191
191 @DomName('SQLResultSet.insertId') 192 @DomName('SQLResultSet.insertId')
192 @DocsEditable() 193 @DocsEditable()
193 int get insertId native "SQLResultSet_insertId_Getter"; 194 int get insertId => blink.Native_SQLResultSet_insertId_Getter(this);
194 195
195 @DomName('SQLResultSet.rows') 196 @DomName('SQLResultSet.rows')
196 @DocsEditable() 197 @DocsEditable()
197 SqlResultSetRowList get rows native "SQLResultSet_rows_Getter"; 198 SqlResultSetRowList get rows => blink.Native_SQLResultSet_rows_Getter(this);
198 199
199 @DomName('SQLResultSet.rowsAffected') 200 @DomName('SQLResultSet.rowsAffected')
200 @DocsEditable() 201 @DocsEditable()
201 int get rowsAffected native "SQLResultSet_rowsAffected_Getter"; 202 int get rowsAffected => blink.Native_SQLResultSet_rowsAffected_Getter(this);
202 203
203 } 204 }
204 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 205 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
205 // for details. All rights reserved. Use of this source code is governed by a 206 // for details. All rights reserved. Use of this source code is governed by a
206 // BSD-style license that can be found in the LICENSE file. 207 // BSD-style license that can be found in the LICENSE file.
207 208
208 // WARNING: Do not edit - generated code. 209 // WARNING: Do not edit - generated code.
209 210
210 211
211 @DocsEditable() 212 @DocsEditable()
212 @DomName('SQLResultSetRowList') 213 @DomName('SQLResultSetRowList')
213 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist 214 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist
214 @Experimental() // deprecated 215 @Experimental() // deprecated
215 class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> { 216 class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> {
216 // To suppress missing implicit constructor warnings. 217 // To suppress missing implicit constructor warnings.
217 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); } 218 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
218 219
219 @DomName('SQLResultSetRowList.length') 220 @DomName('SQLResultSetRowList.length')
220 @DocsEditable() 221 @DocsEditable()
221 int get length native "SQLResultSetRowList_length_Getter"; 222 int get length => blink.Native_SQLResultSetRowList_length_Getter(this);
222 223
223 Map operator[](int index) { 224 Map operator[](int index) {
224 if (index < 0 || index >= length) 225 if (index < 0 || index >= length)
225 throw new RangeError.range(index, 0, length); 226 throw new RangeError.range(index, 0, length);
226 return _nativeIndexedGetter(index); 227 return blink.Native_SQLResultSetRowList_NativeIndexed_Getter(this, index);
227 } 228 }
228 Map _nativeIndexedGetter(int index) native "SQLResultSetRowList_item_Callback" ; 229
230 Map _nativeIndexedGetter(int index) => blink.Native_SQLResultSetRowList_Native Indexed_Getter(this, index);
229 231
230 void operator[]=(int index, Map value) { 232 void operator[]=(int index, Map value) {
231 throw new UnsupportedError("Cannot assign element of immutable List."); 233 throw new UnsupportedError("Cannot assign element of immutable List.");
232 } 234 }
233 // -- start List<Map> mixins. 235 // -- start List<Map> mixins.
234 // Map is the element type. 236 // Map is the element type.
235 237
236 238
237 void set length(int value) { 239 void set length(int value) {
238 throw new UnsupportedError("Cannot resize immutable List."); 240 throw new UnsupportedError("Cannot resize immutable List.");
(...skipping 21 matching lines...) Expand all
260 } 262 }
261 if (len == 0) throw new StateError("No elements"); 263 if (len == 0) throw new StateError("No elements");
262 throw new StateError("More than one element"); 264 throw new StateError("More than one element");
263 } 265 }
264 266
265 Map elementAt(int index) => this[index]; 267 Map elementAt(int index) => this[index];
266 // -- end List<Map> mixins. 268 // -- end List<Map> mixins.
267 269
268 @DomName('SQLResultSetRowList.item') 270 @DomName('SQLResultSetRowList.item')
269 @DocsEditable() 271 @DocsEditable()
270 Map item(int index) native "SQLResultSetRowList_item_Callback"; 272 Map item(int index) => blink.Native_SQLResultSetRowList_item_Callback(this, in dex);
271 273
272 } 274 }
273 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 275 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
274 // for details. All rights reserved. Use of this source code is governed by a 276 // for details. All rights reserved. Use of this source code is governed by a
275 // BSD-style license that can be found in the LICENSE file. 277 // BSD-style license that can be found in the LICENSE file.
276 278
277 // WARNING: Do not edit - generated code. 279 // WARNING: Do not edit - generated code.
278 280
279 281
280 @DocsEditable() 282 @DocsEditable()
281 @DomName('SQLTransaction') 283 @DomName('SQLTransaction')
282 @SupportedBrowser(SupportedBrowser.CHROME) 284 @SupportedBrowser(SupportedBrowser.CHROME)
283 @SupportedBrowser(SupportedBrowser.SAFARI) 285 @SupportedBrowser(SupportedBrowser.SAFARI)
284 @Experimental() 286 @Experimental()
285 // http://www.w3.org/TR/webdatabase/#sqltransaction 287 // http://www.w3.org/TR/webdatabase/#sqltransaction
286 @deprecated // deprecated 288 @deprecated // deprecated
287 class SqlTransaction extends NativeFieldWrapperClass2 { 289 class SqlTransaction extends NativeFieldWrapperClass2 {
288 // To suppress missing implicit constructor warnings. 290 // To suppress missing implicit constructor warnings.
289 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } 291 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
290 292
291 @DomName('SQLTransaction.executeSql') 293 @DomName('SQLTransaction.executeSql')
292 @DocsEditable() 294 @DocsEditable()
293 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) native "SQLTransaction_ executeSql_Callback"; 295 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) => blink.Native_SQLTran saction_executeSql_Callback(this, sqlStatement, arguments, callback, errorCallba ck);
294 296
295 } 297 }
296 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 298 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
297 // for details. All rights reserved. Use of this source code is governed by a 299 // for details. All rights reserved. Use of this source code is governed by a
298 // BSD-style license that can be found in the LICENSE file. 300 // BSD-style license that can be found in the LICENSE file.
299 301
300 // WARNING: Do not edit - generated code. 302 // WARNING: Do not edit - generated code.
301 303
302 304
303 @DocsEditable() 305 @DocsEditable()
304 @DomName('SQLTransactionSync') 306 @DomName('SQLTransactionSync')
305 @SupportedBrowser(SupportedBrowser.CHROME) 307 @SupportedBrowser(SupportedBrowser.CHROME)
306 @SupportedBrowser(SupportedBrowser.SAFARI) 308 @SupportedBrowser(SupportedBrowser.SAFARI)
307 @Experimental() 309 @Experimental()
308 // http://www.w3.org/TR/webdatabase/#sqltransactionsync 310 // http://www.w3.org/TR/webdatabase/#sqltransactionsync
309 @Experimental() // deprecated 311 @Experimental() // deprecated
310 abstract class _SQLTransactionSync extends NativeFieldWrapperClass2 { 312 abstract class _SQLTransactionSync extends NativeFieldWrapperClass2 {
311 // To suppress missing implicit constructor warnings. 313 // To suppress missing implicit constructor warnings.
312 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); } 314 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); }
313 315
314 } 316 }
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | tools/dom/scripts/dartdomgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698