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

Side by Side Diff: sdk/lib/indexed_db/dartium/indexed_db_dartium.dart

Issue 12035022: Minor unification with dart2js bindings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
OLDNEW
1 library indexed_db; 1 library indexed_db;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 import 'dart:html'; 4 import 'dart:html';
5 import 'dart:html_common'; 5 import 'dart:html_common';
6 import 'dart:nativewrappers'; 6 import 'dart:nativewrappers';
7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
8 // for details. All rights reserved. Use of this source code is governed by a 8 // for details. All rights reserved. Use of this source code is governed by a
9 // BSD-style license that can be found in the LICENSE file. 9 // BSD-style license that can be found in the LICENSE file.
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 void continueFunction([/*IDBKey*/ key]) { 68 void continueFunction([/*IDBKey*/ key]) {
69 if (?key) { 69 if (?key) {
70 _continue_1(key); 70 _continue_1(key);
71 return; 71 return;
72 } 72 }
73 _continue_2(); 73 _continue_2();
74 } 74 }
75 75
76 @DocsEditable 76 @DocsEditable
77 @DomName('IDBCursor.continue_1') 77 @DomName('IDBCursor._continue_1')
78 void _continue_1(key) native "IDBCursor_continue_1_Callback"; 78 void _continue_1(key) native "IDBCursor__continue_1_Callback";
79 79
80 @DocsEditable 80 @DocsEditable
81 @DomName('IDBCursor.continue_2') 81 @DomName('IDBCursor._continue_2')
82 void _continue_2() native "IDBCursor_continue_2_Callback"; 82 void _continue_2() native "IDBCursor__continue_2_Callback";
83 83
84 @DocsEditable 84 @DocsEditable
85 @DomName('IDBCursor.delete') 85 @DomName('IDBCursor.delete')
86 Request delete() native "IDBCursor_delete_Callback"; 86 Request delete() native "IDBCursor_delete_Callback";
87 87
88 @DocsEditable 88 @DocsEditable
89 @DomName('IDBCursor.update') 89 @DomName('IDBCursor.update')
90 Request update(Object value) native "IDBCursor_update_Callback"; 90 Request update(Object value) native "IDBCursor_update_Callback";
91 91
92 } 92 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n ull) && (mode is String || mode == null)) { 183 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n ull) && (mode is String || mode == null)) {
184 return _transaction_2(storeName_OR_storeNames, mode); 184 return _transaction_2(storeName_OR_storeNames, mode);
185 } 185 }
186 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) & & (mode is String || mode == null)) { 186 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) & & (mode is String || mode == null)) {
187 return _transaction_3(storeName_OR_storeNames, mode); 187 return _transaction_3(storeName_OR_storeNames, mode);
188 } 188 }
189 throw new ArgumentError("Incorrect number or type of arguments"); 189 throw new ArgumentError("Incorrect number or type of arguments");
190 } 190 }
191 191
192 @DocsEditable 192 @DocsEditable
193 @DomName('IDBDatabase.transaction_1') 193 @DomName('IDBDatabase._transaction_1')
194 Transaction _transaction_1(storeName_OR_storeNames, mode) native "IDBDatabase_ transaction_1_Callback"; 194 Transaction _transaction_1(storeName_OR_storeNames, mode) native "IDBDatabase_ _transaction_1_Callback";
195 195
196 @DocsEditable 196 @DocsEditable
197 @DomName('IDBDatabase.transaction_2') 197 @DomName('IDBDatabase._transaction_2')
198 Transaction _transaction_2(storeName_OR_storeNames, mode) native "IDBDatabase_ transaction_2_Callback"; 198 Transaction _transaction_2(storeName_OR_storeNames, mode) native "IDBDatabase_ _transaction_2_Callback";
199 199
200 @DocsEditable 200 @DocsEditable
201 @DomName('IDBDatabase.transaction_3') 201 @DomName('IDBDatabase._transaction_3')
202 Transaction _transaction_3(storeName_OR_storeNames, mode) native "IDBDatabase_ transaction_3_Callback"; 202 Transaction _transaction_3(storeName_OR_storeNames, mode) native "IDBDatabase_ _transaction_3_Callback";
203 203
204 @DocsEditable 204 @DocsEditable
205 @DomName('IDBDatabase.abort') 205 @DomName('IDBDatabase.abort')
206 Stream<Event> get onAbort => abortEvent.forTarget(this); 206 Stream<Event> get onAbort => abortEvent.forTarget(this);
207 207
208 @DocsEditable 208 @DocsEditable
209 @DomName('IDBDatabase.error') 209 @DomName('IDBDatabase.error')
210 Stream<Event> get onError => errorEvent.forTarget(this); 210 Stream<Event> get onError => errorEvent.forTarget(this);
211 211
212 @DocsEditable 212 @DocsEditable
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 VersionChangeRequest deleteDatabase(String name) native "IDBFactory_deleteData base_Callback"; 259 VersionChangeRequest deleteDatabase(String name) native "IDBFactory_deleteData base_Callback";
260 260
261 OpenDBRequest open(String name, [int version]) { 261 OpenDBRequest open(String name, [int version]) {
262 if (?version) { 262 if (?version) {
263 return _open_1(name, version); 263 return _open_1(name, version);
264 } 264 }
265 return _open_2(name); 265 return _open_2(name);
266 } 266 }
267 267
268 @DocsEditable 268 @DocsEditable
269 @DomName('IDBFactory.open_1') 269 @DomName('IDBFactory._open_1')
270 OpenDBRequest _open_1(name, version) native "IDBFactory_open_1_Callback"; 270 OpenDBRequest _open_1(name, version) native "IDBFactory__open_1_Callback";
271 271
272 @DocsEditable 272 @DocsEditable
273 @DomName('IDBFactory.open_2') 273 @DomName('IDBFactory._open_2')
274 OpenDBRequest _open_2(name) native "IDBFactory_open_2_Callback"; 274 OpenDBRequest _open_2(name) native "IDBFactory__open_2_Callback";
275 275
276 @DocsEditable 276 @DocsEditable
277 @DomName('IDBFactory.webkitGetDatabaseNames') 277 @DomName('IDBFactory.webkitGetDatabaseNames')
278 Request webkitGetDatabaseNames() native "IDBFactory_webkitGetDatabaseNames_Cal lback"; 278 Request webkitGetDatabaseNames() native "IDBFactory_webkitGetDatabaseNames_Cal lback";
279 279
280 } 280 }
281 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 281 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
282 // for details. All rights reserved. Use of this source code is governed by a 282 // for details. All rights reserved. Use of this source code is governed by a
283 // BSD-style license that can be found in the LICENSE file. 283 // BSD-style license that can be found in the LICENSE file.
284 284
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 if ((key_OR_range is KeyRange || key_OR_range == null)) { 317 if ((key_OR_range is KeyRange || key_OR_range == null)) {
318 return _count_2(key_OR_range); 318 return _count_2(key_OR_range);
319 } 319 }
320 if (?key_OR_range) { 320 if (?key_OR_range) {
321 return _count_3(key_OR_range); 321 return _count_3(key_OR_range);
322 } 322 }
323 throw new ArgumentError("Incorrect number or type of arguments"); 323 throw new ArgumentError("Incorrect number or type of arguments");
324 } 324 }
325 325
326 @DocsEditable 326 @DocsEditable
327 @DomName('IDBIndex.count_1') 327 @DomName('IDBIndex._count_1')
328 Request _count_1() native "IDBIndex_count_1_Callback"; 328 Request _count_1() native "IDBIndex__count_1_Callback";
329 329
330 @DocsEditable 330 @DocsEditable
331 @DomName('IDBIndex.count_2') 331 @DomName('IDBIndex._count_2')
332 Request _count_2(key_OR_range) native "IDBIndex_count_2_Callback"; 332 Request _count_2(key_OR_range) native "IDBIndex__count_2_Callback";
333 333
334 @DocsEditable 334 @DocsEditable
335 @DomName('IDBIndex.count_3') 335 @DomName('IDBIndex._count_3')
336 Request _count_3(key_OR_range) native "IDBIndex_count_3_Callback"; 336 Request _count_3(key_OR_range) native "IDBIndex__count_3_Callback";
337 337
338 Request get(key) { 338 Request get(key) {
339 if ((key is KeyRange || key == null)) { 339 if ((key is KeyRange || key == null)) {
340 return _get_1(key); 340 return _get_1(key);
341 } 341 }
342 if (?key) { 342 if (?key) {
343 return _get_2(key); 343 return _get_2(key);
344 } 344 }
345 throw new ArgumentError("Incorrect number or type of arguments"); 345 throw new ArgumentError("Incorrect number or type of arguments");
346 } 346 }
347 347
348 @DocsEditable 348 @DocsEditable
349 @DomName('IDBIndex.get_1') 349 @DomName('IDBIndex._get_1')
350 Request _get_1(key) native "IDBIndex_get_1_Callback"; 350 Request _get_1(key) native "IDBIndex__get_1_Callback";
351 351
352 @DocsEditable 352 @DocsEditable
353 @DomName('IDBIndex.get_2') 353 @DomName('IDBIndex._get_2')
354 Request _get_2(key) native "IDBIndex_get_2_Callback"; 354 Request _get_2(key) native "IDBIndex__get_2_Callback";
355 355
356 Request getKey(key) { 356 Request getKey(key) {
357 if ((key is KeyRange || key == null)) { 357 if ((key is KeyRange || key == null)) {
358 return _getKey_1(key); 358 return _getKey_1(key);
359 } 359 }
360 if (?key) { 360 if (?key) {
361 return _getKey_2(key); 361 return _getKey_2(key);
362 } 362 }
363 throw new ArgumentError("Incorrect number or type of arguments"); 363 throw new ArgumentError("Incorrect number or type of arguments");
364 } 364 }
365 365
366 @DocsEditable 366 @DocsEditable
367 @DomName('IDBIndex.getKey_1') 367 @DomName('IDBIndex._getKey_1')
368 Request _getKey_1(key) native "IDBIndex_getKey_1_Callback"; 368 Request _getKey_1(key) native "IDBIndex__getKey_1_Callback";
369 369
370 @DocsEditable 370 @DocsEditable
371 @DomName('IDBIndex.getKey_2') 371 @DomName('IDBIndex._getKey_2')
372 Request _getKey_2(key) native "IDBIndex_getKey_2_Callback"; 372 Request _getKey_2(key) native "IDBIndex__getKey_2_Callback";
373 373
374 Request openCursor([key_OR_range, String direction]) { 374 Request openCursor([key_OR_range, String direction]) {
375 if (!?key_OR_range && !?direction) { 375 if (!?key_OR_range && !?direction) {
376 return _openCursor_1(); 376 return _openCursor_1();
377 } 377 }
378 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { 378 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) {
379 return _openCursor_2(key_OR_range); 379 return _openCursor_2(key_OR_range);
380 } 380 }
381 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri ng || direction == null)) { 381 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri ng || direction == null)) {
382 return _openCursor_3(key_OR_range, direction); 382 return _openCursor_3(key_OR_range, direction);
383 } 383 }
384 if (?key_OR_range && !?direction) { 384 if (?key_OR_range && !?direction) {
385 return _openCursor_4(key_OR_range); 385 return _openCursor_4(key_OR_range);
386 } 386 }
387 if (?key_OR_range && (direction is String || direction == null)) { 387 if (?key_OR_range && (direction is String || direction == null)) {
388 return _openCursor_5(key_OR_range, direction); 388 return _openCursor_5(key_OR_range, direction);
389 } 389 }
390 throw new ArgumentError("Incorrect number or type of arguments"); 390 throw new ArgumentError("Incorrect number or type of arguments");
391 } 391 }
392 392
393 @DocsEditable 393 @DocsEditable
394 @DomName('IDBIndex.openCursor_1') 394 @DomName('IDBIndex._openCursor_1')
395 Request _openCursor_1() native "IDBIndex_openCursor_1_Callback"; 395 Request _openCursor_1() native "IDBIndex__openCursor_1_Callback";
396 396
397 @DocsEditable 397 @DocsEditable
398 @DomName('IDBIndex.openCursor_2') 398 @DomName('IDBIndex._openCursor_2')
399 Request _openCursor_2(key_OR_range) native "IDBIndex_openCursor_2_Callback"; 399 Request _openCursor_2(key_OR_range) native "IDBIndex__openCursor_2_Callback";
400 400
401 @DocsEditable 401 @DocsEditable
402 @DomName('IDBIndex.openCursor_3') 402 @DomName('IDBIndex._openCursor_3')
403 Request _openCursor_3(key_OR_range, direction) native "IDBIndex_openCursor_3_C allback"; 403 Request _openCursor_3(key_OR_range, direction) native "IDBIndex__openCursor_3_ Callback";
404 404
405 @DocsEditable 405 @DocsEditable
406 @DomName('IDBIndex.openCursor_4') 406 @DomName('IDBIndex._openCursor_4')
407 Request _openCursor_4(key_OR_range) native "IDBIndex_openCursor_4_Callback"; 407 Request _openCursor_4(key_OR_range) native "IDBIndex__openCursor_4_Callback";
408 408
409 @DocsEditable 409 @DocsEditable
410 @DomName('IDBIndex.openCursor_5') 410 @DomName('IDBIndex._openCursor_5')
411 Request _openCursor_5(key_OR_range, direction) native "IDBIndex_openCursor_5_C allback"; 411 Request _openCursor_5(key_OR_range, direction) native "IDBIndex__openCursor_5_ Callback";
412 412
413 Request openKeyCursor([key_OR_range, String direction]) { 413 Request openKeyCursor([key_OR_range, String direction]) {
414 if (!?key_OR_range && !?direction) { 414 if (!?key_OR_range && !?direction) {
415 return _openKeyCursor_1(); 415 return _openKeyCursor_1();
416 } 416 }
417 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { 417 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) {
418 return _openKeyCursor_2(key_OR_range); 418 return _openKeyCursor_2(key_OR_range);
419 } 419 }
420 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri ng || direction == null)) { 420 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri ng || direction == null)) {
421 return _openKeyCursor_3(key_OR_range, direction); 421 return _openKeyCursor_3(key_OR_range, direction);
422 } 422 }
423 if (?key_OR_range && !?direction) { 423 if (?key_OR_range && !?direction) {
424 return _openKeyCursor_4(key_OR_range); 424 return _openKeyCursor_4(key_OR_range);
425 } 425 }
426 if (?key_OR_range && (direction is String || direction == null)) { 426 if (?key_OR_range && (direction is String || direction == null)) {
427 return _openKeyCursor_5(key_OR_range, direction); 427 return _openKeyCursor_5(key_OR_range, direction);
428 } 428 }
429 throw new ArgumentError("Incorrect number or type of arguments"); 429 throw new ArgumentError("Incorrect number or type of arguments");
430 } 430 }
431 431
432 @DocsEditable 432 @DocsEditable
433 @DomName('IDBIndex.openKeyCursor_1') 433 @DomName('IDBIndex._openKeyCursor_1')
434 Request _openKeyCursor_1() native "IDBIndex_openKeyCursor_1_Callback"; 434 Request _openKeyCursor_1() native "IDBIndex__openKeyCursor_1_Callback";
435 435
436 @DocsEditable 436 @DocsEditable
437 @DomName('IDBIndex.openKeyCursor_2') 437 @DomName('IDBIndex._openKeyCursor_2')
438 Request _openKeyCursor_2(key_OR_range) native "IDBIndex_openKeyCursor_2_Callba ck"; 438 Request _openKeyCursor_2(key_OR_range) native "IDBIndex__openKeyCursor_2_Callb ack";
439 439
440 @DocsEditable 440 @DocsEditable
441 @DomName('IDBIndex.openKeyCursor_3') 441 @DomName('IDBIndex._openKeyCursor_3')
442 Request _openKeyCursor_3(key_OR_range, direction) native "IDBIndex_openKeyCurs or_3_Callback"; 442 Request _openKeyCursor_3(key_OR_range, direction) native "IDBIndex__openKeyCur sor_3_Callback";
443 443
444 @DocsEditable 444 @DocsEditable
445 @DomName('IDBIndex.openKeyCursor_4') 445 @DomName('IDBIndex._openKeyCursor_4')
446 Request _openKeyCursor_4(key_OR_range) native "IDBIndex_openKeyCursor_4_Callba ck"; 446 Request _openKeyCursor_4(key_OR_range) native "IDBIndex__openKeyCursor_4_Callb ack";
447 447
448 @DocsEditable 448 @DocsEditable
449 @DomName('IDBIndex.openKeyCursor_5') 449 @DomName('IDBIndex._openKeyCursor_5')
450 Request _openKeyCursor_5(key_OR_range, direction) native "IDBIndex_openKeyCurs or_5_Callback"; 450 Request _openKeyCursor_5(key_OR_range, direction) native "IDBIndex__openKeyCur sor_5_Callback";
451 451
452 } 452 }
453 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 453 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
454 // for details. All rights reserved. Use of this source code is governed by a 454 // for details. All rights reserved. Use of this source code is governed by a
455 // BSD-style license that can be found in the LICENSE file. 455 // BSD-style license that can be found in the LICENSE file.
456 456
457 // WARNING: Do not edit - generated code. 457 // WARNING: Do not edit - generated code.
458 458
459 459
460 @DocsEditable 460 @DocsEditable
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 if (?upperOpen) { 511 if (?upperOpen) {
512 return _bound_1(lower, upper, lowerOpen, upperOpen); 512 return _bound_1(lower, upper, lowerOpen, upperOpen);
513 } 513 }
514 if (?lowerOpen) { 514 if (?lowerOpen) {
515 return _bound_2(lower, upper, lowerOpen); 515 return _bound_2(lower, upper, lowerOpen);
516 } 516 }
517 return _bound_3(lower, upper); 517 return _bound_3(lower, upper);
518 } 518 }
519 519
520 @DocsEditable 520 @DocsEditable
521 @DomName('IDBKeyRange.bound_1') 521 @DomName('IDBKeyRange._bound_1')
522 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan ge_bound_1_Callback"; 522 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan ge__bound_1_Callback";
523 523
524 @DocsEditable 524 @DocsEditable
525 @DomName('IDBKeyRange.bound_2') 525 @DomName('IDBKeyRange._bound_2')
526 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange_bound_2_ Callback"; 526 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange__bound_2 _Callback";
527 527
528 @DocsEditable 528 @DocsEditable
529 @DomName('IDBKeyRange.bound_3') 529 @DomName('IDBKeyRange._bound_3')
530 static KeyRange _bound_3(lower, upper) native "IDBKeyRange_bound_3_Callback"; 530 static KeyRange _bound_3(lower, upper) native "IDBKeyRange__bound_3_Callback";
531 531
532 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) { 532 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) {
533 if (?open) { 533 if (?open) {
534 return _lowerBound_1(bound, open); 534 return _lowerBound_1(bound, open);
535 } 535 }
536 return _lowerBound_2(bound); 536 return _lowerBound_2(bound);
537 } 537 }
538 538
539 @DocsEditable 539 @DocsEditable
540 @DomName('IDBKeyRange.lowerBound_1') 540 @DomName('IDBKeyRange._lowerBound_1')
541 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange_lowerBound_1_Ca llback"; 541 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange__lowerBound_1_C allback";
542 542
543 @DocsEditable 543 @DocsEditable
544 @DomName('IDBKeyRange.lowerBound_2') 544 @DomName('IDBKeyRange._lowerBound_2')
545 static KeyRange _lowerBound_2(bound) native "IDBKeyRange_lowerBound_2_Callback "; 545 static KeyRange _lowerBound_2(bound) native "IDBKeyRange__lowerBound_2_Callbac k";
546 546
547 @DocsEditable 547 @DocsEditable
548 @DomName('IDBKeyRange.only_') 548 @DomName('IDBKeyRange.only_')
549 static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback"; 549 static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback";
550 550
551 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) { 551 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) {
552 if (?open) { 552 if (?open) {
553 return _upperBound_1(bound, open); 553 return _upperBound_1(bound, open);
554 } 554 }
555 return _upperBound_2(bound); 555 return _upperBound_2(bound);
556 } 556 }
557 557
558 @DocsEditable 558 @DocsEditable
559 @DomName('IDBKeyRange.upperBound_1') 559 @DomName('IDBKeyRange._upperBound_1')
560 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange_upperBound_1_Ca llback"; 560 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange__upperBound_1_C allback";
561 561
562 @DocsEditable 562 @DocsEditable
563 @DomName('IDBKeyRange.upperBound_2') 563 @DomName('IDBKeyRange._upperBound_2')
564 static KeyRange _upperBound_2(bound) native "IDBKeyRange_upperBound_2_Callback "; 564 static KeyRange _upperBound_2(bound) native "IDBKeyRange__upperBound_2_Callbac k";
565 565
566 } 566 }
567 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 567 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
568 // for details. All rights reserved. Use of this source code is governed by a 568 // for details. All rights reserved. Use of this source code is governed by a
569 // BSD-style license that can be found in the LICENSE file. 569 // BSD-style license that can be found in the LICENSE file.
570 570
571 // WARNING: Do not edit - generated code. 571 // WARNING: Do not edit - generated code.
572 572
573 573
574 @DocsEditable 574 @DocsEditable
(...skipping 22 matching lines...) Expand all
597 Transaction get transaction native "IDBObjectStore_transaction_Getter"; 597 Transaction get transaction native "IDBObjectStore_transaction_Getter";
598 598
599 Request add(Object value, [/*IDBKey*/ key]) { 599 Request add(Object value, [/*IDBKey*/ key]) {
600 if (?key) { 600 if (?key) {
601 return _add_1(value, key); 601 return _add_1(value, key);
602 } 602 }
603 return _add_2(value); 603 return _add_2(value);
604 } 604 }
605 605
606 @DocsEditable 606 @DocsEditable
607 @DomName('IDBObjectStore.add_1') 607 @DomName('IDBObjectStore._add_1')
608 Request _add_1(value, key) native "IDBObjectStore_add_1_Callback"; 608 Request _add_1(value, key) native "IDBObjectStore__add_1_Callback";
609 609
610 @DocsEditable 610 @DocsEditable
611 @DomName('IDBObjectStore.add_2') 611 @DomName('IDBObjectStore._add_2')
612 Request _add_2(value) native "IDBObjectStore_add_2_Callback"; 612 Request _add_2(value) native "IDBObjectStore__add_2_Callback";
613 613
614 @DocsEditable 614 @DocsEditable
615 @DomName('IDBObjectStore.clear') 615 @DomName('IDBObjectStore.clear')
616 Request clear() native "IDBObjectStore_clear_Callback"; 616 Request clear() native "IDBObjectStore_clear_Callback";
617 617
618 Request count([key_OR_range]) { 618 Request count([key_OR_range]) {
619 if (!?key_OR_range) { 619 if (!?key_OR_range) {
620 return _count_1(); 620 return _count_1();
621 } 621 }
622 if ((key_OR_range is KeyRange || key_OR_range == null)) { 622 if ((key_OR_range is KeyRange || key_OR_range == null)) {
623 return _count_2(key_OR_range); 623 return _count_2(key_OR_range);
624 } 624 }
625 if (?key_OR_range) { 625 if (?key_OR_range) {
626 return _count_3(key_OR_range); 626 return _count_3(key_OR_range);
627 } 627 }
628 throw new ArgumentError("Incorrect number or type of arguments"); 628 throw new ArgumentError("Incorrect number or type of arguments");
629 } 629 }
630 630
631 @DocsEditable 631 @DocsEditable
632 @DomName('IDBObjectStore.count_1') 632 @DomName('IDBObjectStore._count_1')
633 Request _count_1() native "IDBObjectStore_count_1_Callback"; 633 Request _count_1() native "IDBObjectStore__count_1_Callback";
634 634
635 @DocsEditable 635 @DocsEditable
636 @DomName('IDBObjectStore.count_2') 636 @DomName('IDBObjectStore._count_2')
637 Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback"; 637 Request _count_2(key_OR_range) native "IDBObjectStore__count_2_Callback";
638 638
639 @DocsEditable 639 @DocsEditable
640 @DomName('IDBObjectStore.count_3') 640 @DomName('IDBObjectStore._count_3')
641 Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback"; 641 Request _count_3(key_OR_range) native "IDBObjectStore__count_3_Callback";
642 642
643 Index createIndex(String name, keyPath, [Map options]) { 643 Index createIndex(String name, keyPath, [Map options]) {
644 if ((name is String || name == null) && (keyPath is List<String> || keyPath == null) && (options is Map || options == null)) { 644 if ((name is String || name == null) && (keyPath is List<String> || keyPath == null) && (options is Map || options == null)) {
645 return _createIndex_1(name, keyPath, options); 645 return _createIndex_1(name, keyPath, options);
646 } 646 }
647 if ((name is String || name == null) && (keyPath is String || keyPath == nul l) && (options is Map || options == null)) { 647 if ((name is String || name == null) && (keyPath is String || keyPath == nul l) && (options is Map || options == null)) {
648 return _createIndex_2(name, keyPath, options); 648 return _createIndex_2(name, keyPath, options);
649 } 649 }
650 throw new ArgumentError("Incorrect number or type of arguments"); 650 throw new ArgumentError("Incorrect number or type of arguments");
651 } 651 }
652 652
653 @DocsEditable 653 @DocsEditable
654 @DomName('IDBObjectStore.createIndex_1') 654 @DomName('IDBObjectStore._createIndex_1')
655 Index _createIndex_1(name, keyPath, options) native "IDBObjectStore_createInde x_1_Callback"; 655 Index _createIndex_1(name, keyPath, options) native "IDBObjectStore__createInd ex_1_Callback";
656 656
657 @DocsEditable 657 @DocsEditable
658 @DomName('IDBObjectStore.createIndex_2') 658 @DomName('IDBObjectStore._createIndex_2')
659 Index _createIndex_2(name, keyPath, options) native "IDBObjectStore_createInde x_2_Callback"; 659 Index _createIndex_2(name, keyPath, options) native "IDBObjectStore__createInd ex_2_Callback";
660 660
661 Request delete(key_OR_keyRange) { 661 Request delete(key_OR_keyRange) {
662 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) { 662 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) {
663 return _delete_1(key_OR_keyRange); 663 return _delete_1(key_OR_keyRange);
664 } 664 }
665 if (?key_OR_keyRange) { 665 if (?key_OR_keyRange) {
666 return _delete_2(key_OR_keyRange); 666 return _delete_2(key_OR_keyRange);
667 } 667 }
668 throw new ArgumentError("Incorrect number or type of arguments"); 668 throw new ArgumentError("Incorrect number or type of arguments");
669 } 669 }
670 670
671 @DocsEditable 671 @DocsEditable
672 @DomName('IDBObjectStore.delete_1') 672 @DomName('IDBObjectStore._delete_1')
673 Request _delete_1(key_OR_keyRange) native "IDBObjectStore_delete_1_Callback"; 673 Request _delete_1(key_OR_keyRange) native "IDBObjectStore__delete_1_Callback";
674 674
675 @DocsEditable 675 @DocsEditable
676 @DomName('IDBObjectStore.delete_2') 676 @DomName('IDBObjectStore._delete_2')
677 Request _delete_2(key_OR_keyRange) native "IDBObjectStore_delete_2_Callback"; 677 Request _delete_2(key_OR_keyRange) native "IDBObjectStore__delete_2_Callback";
678 678
679 @DocsEditable 679 @DocsEditable
680 @DomName('IDBObjectStore.deleteIndex') 680 @DomName('IDBObjectStore.deleteIndex')
681 void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback"; 681 void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback";
682 682
683 Request getObject(key) { 683 Request getObject(key) {
684 if ((key is KeyRange || key == null)) { 684 if ((key is KeyRange || key == null)) {
685 return _get_1(key); 685 return _get_1(key);
686 } 686 }
687 if (?key) { 687 if (?key) {
688 return _get_2(key); 688 return _get_2(key);
689 } 689 }
690 throw new ArgumentError("Incorrect number or type of arguments"); 690 throw new ArgumentError("Incorrect number or type of arguments");
691 } 691 }
692 692
693 @DocsEditable 693 @DocsEditable
694 @DomName('IDBObjectStore.get_1') 694 @DomName('IDBObjectStore._get_1')
695 Request _get_1(key) native "IDBObjectStore_get_1_Callback"; 695 Request _get_1(key) native "IDBObjectStore__get_1_Callback";
696 696
697 @DocsEditable 697 @DocsEditable
698 @DomName('IDBObjectStore.get_2') 698 @DomName('IDBObjectStore._get_2')
699 Request _get_2(key) native "IDBObjectStore_get_2_Callback"; 699 Request _get_2(key) native "IDBObjectStore__get_2_Callback";
700 700
701 @DocsEditable 701 @DocsEditable
702 @DomName('IDBObjectStore.index') 702 @DomName('IDBObjectStore.index')
703 Index index(String name) native "IDBObjectStore_index_Callback"; 703 Index index(String name) native "IDBObjectStore_index_Callback";
704 704
705 Request openCursor([key_OR_range, String direction]) { 705 Request openCursor([key_OR_range, String direction]) {
706 if (!?key_OR_range && !?direction) { 706 if (!?key_OR_range && !?direction) {
707 return _openCursor_1(); 707 return _openCursor_1();
708 } 708 }
709 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { 709 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) {
710 return _openCursor_2(key_OR_range); 710 return _openCursor_2(key_OR_range);
711 } 711 }
712 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri ng || direction == null)) { 712 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri ng || direction == null)) {
713 return _openCursor_3(key_OR_range, direction); 713 return _openCursor_3(key_OR_range, direction);
714 } 714 }
715 if (?key_OR_range && !?direction) { 715 if (?key_OR_range && !?direction) {
716 return _openCursor_4(key_OR_range); 716 return _openCursor_4(key_OR_range);
717 } 717 }
718 if (?key_OR_range && (direction is String || direction == null)) { 718 if (?key_OR_range && (direction is String || direction == null)) {
719 return _openCursor_5(key_OR_range, direction); 719 return _openCursor_5(key_OR_range, direction);
720 } 720 }
721 throw new ArgumentError("Incorrect number or type of arguments"); 721 throw new ArgumentError("Incorrect number or type of arguments");
722 } 722 }
723 723
724 @DocsEditable 724 @DocsEditable
725 @DomName('IDBObjectStore.openCursor_1') 725 @DomName('IDBObjectStore._openCursor_1')
726 Request _openCursor_1() native "IDBObjectStore_openCursor_1_Callback"; 726 Request _openCursor_1() native "IDBObjectStore__openCursor_1_Callback";
727 727
728 @DocsEditable 728 @DocsEditable
729 @DomName('IDBObjectStore.openCursor_2') 729 @DomName('IDBObjectStore._openCursor_2')
730 Request _openCursor_2(key_OR_range) native "IDBObjectStore_openCursor_2_Callba ck"; 730 Request _openCursor_2(key_OR_range) native "IDBObjectStore__openCursor_2_Callb ack";
731 731
732 @DocsEditable 732 @DocsEditable
733 @DomName('IDBObjectStore.openCursor_3') 733 @DomName('IDBObjectStore._openCursor_3')
734 Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore_openCurs or_3_Callback"; 734 Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore__openCur sor_3_Callback";
735 735
736 @DocsEditable 736 @DocsEditable
737 @DomName('IDBObjectStore.openCursor_4') 737 @DomName('IDBObjectStore._openCursor_4')
738 Request _openCursor_4(key_OR_range) native "IDBObjectStore_openCursor_4_Callba ck"; 738 Request _openCursor_4(key_OR_range) native "IDBObjectStore__openCursor_4_Callb ack";
739 739
740 @DocsEditable 740 @DocsEditable
741 @DomName('IDBObjectStore.openCursor_5') 741 @DomName('IDBObjectStore._openCursor_5')
742 Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore_openCurs or_5_Callback"; 742 Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore__openCur sor_5_Callback";
743 743
744 Request put(Object value, [/*IDBKey*/ key]) { 744 Request put(Object value, [/*IDBKey*/ key]) {
745 if (?key) { 745 if (?key) {
746 return _put_1(value, key); 746 return _put_1(value, key);
747 } 747 }
748 return _put_2(value); 748 return _put_2(value);
749 } 749 }
750 750
751 @DocsEditable 751 @DocsEditable
752 @DomName('IDBObjectStore.put_1') 752 @DomName('IDBObjectStore._put_1')
753 Request _put_1(value, key) native "IDBObjectStore_put_1_Callback"; 753 Request _put_1(value, key) native "IDBObjectStore__put_1_Callback";
754 754
755 @DocsEditable 755 @DocsEditable
756 @DomName('IDBObjectStore.put_2') 756 @DomName('IDBObjectStore._put_2')
757 Request _put_2(value) native "IDBObjectStore_put_2_Callback"; 757 Request _put_2(value) native "IDBObjectStore__put_2_Callback";
758 758
759 } 759 }
760 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 760 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
761 // for details. All rights reserved. Use of this source code is governed by a 761 // for details. All rights reserved. Use of this source code is governed by a
762 // BSD-style license that can be found in the LICENSE file. 762 // BSD-style license that can be found in the LICENSE file.
763 763
764 // WARNING: Do not edit - generated code. 764 // WARNING: Do not edit - generated code.
765 765
766 766
767 @DocsEditable 767 @DocsEditable
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 1057
1058 // WARNING: Do not edit - generated code. 1058 // WARNING: Do not edit - generated code.
1059 1059
1060 1060
1061 @DocsEditable 1061 @DocsEditable
1062 @DomName('IDBAny') 1062 @DomName('IDBAny')
1063 class _Any extends NativeFieldWrapperClass1 { 1063 class _Any extends NativeFieldWrapperClass1 {
1064 _Any.internal(); 1064 _Any.internal();
1065 1065
1066 } 1066 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/web_audio/dartium/web_audio_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698