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

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

Issue 667983002: Arity indexing in dart:blink entry points (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/css_code_generator.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 */
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // To suppress missing implicit constructor warnings. 96 // To suppress missing implicit constructor warnings.
97 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } 97 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); }
98 98
99 /// Checks if this type is supported on the current platform. 99 /// Checks if this type is supported on the current platform.
100 static bool get supported => true; 100 static bool get supported => true;
101 101
102 @DomName('Database.version') 102 @DomName('Database.version')
103 @DocsEditable() 103 @DocsEditable()
104 String get version => _blink.BlinkDatabase.version_Getter(this); 104 String get version => _blink.BlinkDatabase.version_Getter(this);
105 105
106 /** 106 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall back]) {
107 * Atomically update the database version to [newVersion], asynchronously 107 if (successCallback != null) {
108 * running [callback] on the [SqlTransaction] representing this 108 _blink.BlinkDatabase.changeVersion_Callback_5(this, oldVersion, newVersion , callback, errorCallback, successCallback);
109 * [changeVersion] transaction. 109 return;
110 * 110 }
111 * If [callback] runs successfully, then [successCallback] is called. 111 if (errorCallback != null) {
112 * Otherwise, [errorCallback] is called. 112 _blink.BlinkDatabase.changeVersion_Callback_4(this, oldVersion, newVersion , callback, errorCallback);
113 * 113 return;
114 * [oldVersion] should match the database's current [version] exactly. 114 }
115 * 115 if (callback != null) {
116 * * [Database.changeVersion](http://www.w3.org/TR/webdatabase/#dom-database-c hangeversion) from W3C. 116 _blink.BlinkDatabase.changeVersion_Callback_3(this, oldVersion, newVersion , callback);
117 */ 117 return;
118 @DomName('Database.changeVersion') 118 }
119 @DocsEditable() 119 _blink.BlinkDatabase.changeVersion_Callback_2(this, oldVersion, newVersion);
120 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall back]) => _blink.BlinkDatabase.changeVersion_Callback_DOMString_DOMString_SQLTra nsactionCallback_SQLTransactionErrorCallback_VoidCallback(this, oldVersion, newV ersion, callback, errorCallback, successCallback); 120 return;
121 }
121 122
122 @DomName('Database.readTransaction') 123 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall back errorCallback, VoidCallback successCallback]) {
123 @DocsEditable() 124 if (successCallback != null) {
124 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall back errorCallback, VoidCallback successCallback]) => _blink.BlinkDatabase.readT ransaction_Callback_SQLTransactionCallback_SQLTransactionErrorCallback_VoidCallb ack(this, callback, errorCallback, successCallback); 125 _blink.BlinkDatabase.readTransaction_Callback_3(this, callback, errorCallb ack, successCallback);
126 return;
127 }
128 if (errorCallback != null) {
129 _blink.BlinkDatabase.readTransaction_Callback_2(this, callback, errorCallb ack);
130 return;
131 }
132 _blink.BlinkDatabase.readTransaction_Callback_1(this, callback);
133 return;
134 }
125 135
126 @DomName('Database.transaction') 136 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) {
127 @DocsEditable() 137 if (successCallback != null) {
128 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) => _blink.BlinkDatabase.transacti on_Callback_SQLTransactionCallback_SQLTransactionErrorCallback_VoidCallback(this , callback, errorCallback, successCallback); 138 _blink.BlinkDatabase.transaction_Callback_3(this, callback, errorCallback, successCallback);
139 return;
140 }
141 if (errorCallback != null) {
142 _blink.BlinkDatabase.transaction_Callback_2(this, callback, errorCallback) ;
143 return;
144 }
145 _blink.BlinkDatabase.transaction_Callback_1(this, callback);
146 return;
147 }
129 148
130 } 149 }
131 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 150 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
132 // for details. All rights reserved. Use of this source code is governed by a 151 // for details. All rights reserved. Use of this source code is governed by a
133 // BSD-style license that can be found in the LICENSE file. 152 // BSD-style license that can be found in the LICENSE file.
134 153
135 // WARNING: Do not edit - generated code. 154 // WARNING: Do not edit - generated code.
136 155
137 156
138 @DocsEditable() 157 @DocsEditable()
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // To suppress missing implicit constructor warnings. 246 // To suppress missing implicit constructor warnings.
228 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); } 247 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
229 248
230 @DomName('SQLResultSetRowList.length') 249 @DomName('SQLResultSetRowList.length')
231 @DocsEditable() 250 @DocsEditable()
232 int get length => _blink.BlinkSQLResultSetRowList.length_Getter(this); 251 int get length => _blink.BlinkSQLResultSetRowList.length_Getter(this);
233 252
234 Map operator[](int index) { 253 Map operator[](int index) {
235 if (index < 0 || index >= length) 254 if (index < 0 || index >= length)
236 throw new RangeError.range(index, 0, length); 255 throw new RangeError.range(index, 0, length);
237 return _blink.BlinkSQLResultSetRowList.item_Callback_ul(this, index); 256 return _blink.BlinkSQLResultSetRowList.item_Callback_1(this, index);
238 } 257 }
239 258
240 Map _nativeIndexedGetter(int index) => _blink.BlinkSQLResultSetRowList.item_Ca llback_ul(this, index); 259 Map _nativeIndexedGetter(int index) => _blink.BlinkSQLResultSetRowList.item_Ca llback_1(this, index);
241 260
242 void operator[]=(int index, Map value) { 261 void operator[]=(int index, Map value) {
243 throw new UnsupportedError("Cannot assign element of immutable List."); 262 throw new UnsupportedError("Cannot assign element of immutable List.");
244 } 263 }
245 // -- start List<Map> mixins. 264 // -- start List<Map> mixins.
246 // Map is the element type. 265 // Map is the element type.
247 266
248 267
249 void set length(int value) { 268 void set length(int value) {
250 throw new UnsupportedError("Cannot resize immutable List."); 269 throw new UnsupportedError("Cannot resize immutable List.");
(...skipping 21 matching lines...) Expand all
272 } 291 }
273 if (len == 0) throw new StateError("No elements"); 292 if (len == 0) throw new StateError("No elements");
274 throw new StateError("More than one element"); 293 throw new StateError("More than one element");
275 } 294 }
276 295
277 Map elementAt(int index) => this[index]; 296 Map elementAt(int index) => this[index];
278 // -- end List<Map> mixins. 297 // -- end List<Map> mixins.
279 298
280 @DomName('SQLResultSetRowList.item') 299 @DomName('SQLResultSetRowList.item')
281 @DocsEditable() 300 @DocsEditable()
282 Map item(int index) => _blink.BlinkSQLResultSetRowList.item_Callback_ul(this, index); 301 Map item(int index) => _blink.BlinkSQLResultSetRowList.item_Callback_1(this, i ndex);
283 302
284 } 303 }
285 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 304 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
286 // for details. All rights reserved. Use of this source code is governed by a 305 // for details. All rights reserved. Use of this source code is governed by a
287 // BSD-style license that can be found in the LICENSE file. 306 // BSD-style license that can be found in the LICENSE file.
288 307
289 // WARNING: Do not edit - generated code. 308 // WARNING: Do not edit - generated code.
290 309
291 310
292 @DocsEditable() 311 @DocsEditable()
293 @DomName('SQLTransaction') 312 @DomName('SQLTransaction')
294 @SupportedBrowser(SupportedBrowser.CHROME) 313 @SupportedBrowser(SupportedBrowser.CHROME)
295 @SupportedBrowser(SupportedBrowser.SAFARI) 314 @SupportedBrowser(SupportedBrowser.SAFARI)
296 @Experimental() 315 @Experimental()
297 // http://www.w3.org/TR/webdatabase/#sqltransaction 316 // http://www.w3.org/TR/webdatabase/#sqltransaction
298 @deprecated // deprecated 317 @deprecated // deprecated
299 class SqlTransaction extends NativeFieldWrapperClass2 { 318 class SqlTransaction extends NativeFieldWrapperClass2 {
300 // To suppress missing implicit constructor warnings. 319 // To suppress missing implicit constructor warnings.
301 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } 320 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
302 321
303 @DomName('SQLTransaction.executeSql') 322 @DomName('SQLTransaction.executeSql')
304 @DocsEditable() 323 @DocsEditable()
305 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans action.executeSql_Callback_DOMString_A_object_A_SQLStatementCallback_SQLStatemen tErrorCallback(this, sqlStatement, arguments, callback, errorCallback); 324 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans action.executeSql_Callback_4(this, sqlStatement, arguments, callback, errorCallb ack);
306 325
307 } 326 }
308 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 327 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
309 // for details. All rights reserved. Use of this source code is governed by a 328 // for details. All rights reserved. Use of this source code is governed by a
310 // BSD-style license that can be found in the LICENSE file. 329 // BSD-style license that can be found in the LICENSE file.
311 330
312 // WARNING: Do not edit - generated code. 331 // WARNING: Do not edit - generated code.
313 332
314 333
315 @DocsEditable() 334 @DocsEditable()
316 @DomName('SQLTransactionSync') 335 @DomName('SQLTransactionSync')
317 @SupportedBrowser(SupportedBrowser.CHROME) 336 @SupportedBrowser(SupportedBrowser.CHROME)
318 @SupportedBrowser(SupportedBrowser.SAFARI) 337 @SupportedBrowser(SupportedBrowser.SAFARI)
319 @Experimental() 338 @Experimental()
320 // http://www.w3.org/TR/webdatabase/#sqltransactionsync 339 // http://www.w3.org/TR/webdatabase/#sqltransactionsync
321 @Experimental() // deprecated 340 @Experimental() // deprecated
322 abstract class _SQLTransactionSync extends NativeFieldWrapperClass2 { 341 abstract class _SQLTransactionSync extends NativeFieldWrapperClass2 {
323 // To suppress missing implicit constructor warnings. 342 // To suppress missing implicit constructor warnings.
324 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); } 343 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); }
325 344
326 } 345 }
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | tools/dom/scripts/css_code_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698