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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 12218185: Separating Web SQL into dart:web_sql. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/web_sql/dart2js/web_sql_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 65971800ebb2209bcff8da0b6a6d1dfc12f8715f..aed97339203e44fe19637d294b32c3b0bd681871 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -7,6 +7,7 @@ import 'dart:indexed_db';
import 'dart:isolate';
import 'dart:json' as json;
import 'dart:nativewrappers';
+import 'dart:web_sql';
import 'dart:svg' as svg;
import 'dart:web_audio' as web_audio;
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6746,85 +6747,6 @@ class DataView extends ArrayBufferView {
@DocsEditable
-@DomName('Database')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental
-class Database extends NativeFieldWrapperClass1 {
- Database.internal();
-
- /// Checks if this type is supported on the current platform.
- static bool get supported => true;
-
- @DomName('Database.version')
- @DocsEditable
- String get version native "Database_version_Getter";
-
- @DomName('Database.changeVersion')
- @DocsEditable
- void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallback callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native "Database_changeVersion_Callback";
-
- @DomName('Database.readTransaction')
- @DocsEditable
- void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native "Database_readTransaction_Callback";
-
- @DomName('Database.transaction')
- @DocsEditable
- void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native "Database_transaction_Callback";
-
-}
-// 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.
-
-
-typedef void DatabaseCallback(database);
-// 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.
-
-
-@DocsEditable
-@DomName('DatabaseSync')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental
-class DatabaseSync extends NativeFieldWrapperClass1 {
- DatabaseSync.internal();
-
- @DomName('DatabaseSync.lastErrorMessage')
- @DocsEditable
- String get lastErrorMessage native "DatabaseSync_lastErrorMessage_Getter";
-
- @DomName('DatabaseSync.version')
- @DocsEditable
- String get version native "DatabaseSync_version_Getter";
-
- @DomName('DatabaseSync.changeVersion')
- @DocsEditable
- void changeVersion(String oldVersion, String newVersion, [SqlTransactionSyncCallback callback]) native "DatabaseSync_changeVersion_Callback";
-
- @DomName('DatabaseSync.readTransaction')
- @DocsEditable
- void readTransaction(SqlTransactionSyncCallback callback) native "DatabaseSync_readTransaction_Callback";
-
- @DomName('DatabaseSync.transaction')
- @DocsEditable
- void transaction(SqlTransactionSyncCallback callback) native "DatabaseSync_transaction_Callback";
-
-}
-// 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.
-
-
-@DocsEditable
@DomName('DedicatedWorkerContext')
class DedicatedWorkerContext extends WorkerContext {
DedicatedWorkerContext.internal() : super.internal();
@@ -21118,46 +21040,6 @@ class RtcStatsResponse extends NativeFieldWrapperClass1 {
// WARNING: Do not edit - generated code.
-typedef void SqlStatementCallback(SqlTransaction transaction, SqlResultSet resultSet);
-// 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.
-
-
-typedef void SqlStatementErrorCallback(SqlTransaction transaction, SqlError error);
-// 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.
-
-
-typedef void SqlTransactionCallback(SqlTransaction transaction);
-// 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.
-
-
-typedef void SqlTransactionErrorCallback(SqlError error);
-// 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.
-
-
-typedef void SqlTransactionSyncCallback(SqlTransactionSync transaction);
-// 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.
-
-
@DocsEditable
@DomName('Screen')
class Screen extends NativeFieldWrapperClass1 {
@@ -22557,346 +22439,6 @@ class SpeechRecognitionResult extends NativeFieldWrapperClass1 {
// 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.
-
-
-@DocsEditable
-@DomName('SQLError')
-class SqlError extends NativeFieldWrapperClass1 {
- SqlError.internal();
-
- static const int CONSTRAINT_ERR = 6;
-
- static const int DATABASE_ERR = 1;
-
- static const int QUOTA_ERR = 4;
-
- static const int SYNTAX_ERR = 5;
-
- static const int TIMEOUT_ERR = 7;
-
- static const int TOO_LARGE_ERR = 3;
-
- static const int UNKNOWN_ERR = 0;
-
- static const int VERSION_ERR = 2;
-
- @DomName('SQLError.code')
- @DocsEditable
- int get code native "SQLError_code_Getter";
-
- @DomName('SQLError.message')
- @DocsEditable
- String get message native "SQLError_message_Getter";
-
-}
-// 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.
-
-
-@DocsEditable
-@DomName('SQLException')
-class SqlException extends NativeFieldWrapperClass1 {
- SqlException.internal();
-
- static const int CONSTRAINT_ERR = 6;
-
- static const int DATABASE_ERR = 1;
-
- static const int QUOTA_ERR = 4;
-
- static const int SYNTAX_ERR = 5;
-
- static const int TIMEOUT_ERR = 7;
-
- static const int TOO_LARGE_ERR = 3;
-
- static const int UNKNOWN_ERR = 0;
-
- static const int VERSION_ERR = 2;
-
- @DomName('SQLException.code')
- @DocsEditable
- int get code native "SQLException_code_Getter";
-
- @DomName('SQLException.message')
- @DocsEditable
- String get message native "SQLException_message_Getter";
-
-}
-// 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.
-
-
-@DocsEditable
-@DomName('SQLResultSet')
-class SqlResultSet extends NativeFieldWrapperClass1 {
- SqlResultSet.internal();
-
- @DomName('SQLResultSet.insertId')
- @DocsEditable
- int get insertId native "SQLResultSet_insertId_Getter";
-
- @DomName('SQLResultSet.rows')
- @DocsEditable
- SqlResultSetRowList get rows native "SQLResultSet_rows_Getter";
-
- @DomName('SQLResultSet.rowsAffected')
- @DocsEditable
- int get rowsAffected native "SQLResultSet_rowsAffected_Getter";
-
-}
-// 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.
-
-
-@DocsEditable
-@DomName('SQLResultSetRowList')
-class SqlResultSetRowList extends NativeFieldWrapperClass1 implements List<Map> {
- SqlResultSetRowList.internal();
-
- @DomName('SQLResultSetRowList.length')
- @DocsEditable
- int get length native "SQLResultSetRowList_length_Getter";
-
- Map operator[](int index) native "SQLResultSetRowList_item_Callback";
-
- void operator[]=(int index, Map value) {
- throw new UnsupportedError("Cannot assign element of immutable List.");
- }
- // -- start List<Map> mixins.
- // Map is the element type.
-
- // From Iterable<Map>:
-
- Iterator<Map> get iterator {
- // Note: NodeLists are not fixed size. And most probably length shouldn't
- // be cached in both iterator _and_ forEach method. For now caching it
- // for consistency.
- return new FixedSizeListIterator<Map>(this);
- }
-
- dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) {
- return IterableMixinWorkaround.reduce(this, initialValue, combine);
- }
-
- bool contains(Map element) => IterableMixinWorkaround.contains(this, element);
-
- void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f);
-
- String join([String separator]) =>
- IterableMixinWorkaround.joinList(this, separator);
-
- Iterable map(f(Map element)) =>
- IterableMixinWorkaround.mapList(this, f);
-
- Iterable<Map> where(bool f(Map element)) =>
- IterableMixinWorkaround.where(this, f);
-
- Iterable expand(Iterable f(Map element)) =>
- IterableMixinWorkaround.expand(this, f);
-
- bool every(bool f(Map element)) => IterableMixinWorkaround.every(this, f);
-
- bool any(bool f(Map element)) => IterableMixinWorkaround.any(this, f);
-
- List<Map> toList() => new List<Map>.from(this);
- Set<Map> toSet() => new Set<Map>.from(this);
-
- bool get isEmpty => this.length == 0;
-
- Iterable<Map> take(int n) => IterableMixinWorkaround.takeList(this, n);
-
- Iterable<Map> takeWhile(bool test(Map value)) {
- return IterableMixinWorkaround.takeWhile(this, test);
- }
-
- Iterable<Map> skip(int n) => IterableMixinWorkaround.skipList(this, n);
-
- Iterable<Map> skipWhile(bool test(Map value)) {
- return IterableMixinWorkaround.skipWhile(this, test);
- }
-
- Map firstMatching(bool test(Map value), { Map orElse() }) {
- return IterableMixinWorkaround.firstMatching(this, test, orElse);
- }
-
- Map lastMatching(bool test(Map value), {Map orElse()}) {
- return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
- }
-
- Map singleMatching(bool test(Map value)) {
- return IterableMixinWorkaround.singleMatching(this, test);
- }
-
- Map elementAt(int index) {
- return this[index];
- }
-
- // From Collection<Map>:
-
- void add(Map value) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
-
- void addLast(Map value) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
-
- void addAll(Iterable<Map> iterable) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
-
- // From List<Map>:
- void set length(int value) {
- throw new UnsupportedError("Cannot resize immutable List.");
- }
-
- void clear() {
- throw new UnsupportedError("Cannot clear immutable List.");
- }
-
- Iterable<Map> get reversed {
- return IterableMixinWorkaround.reversedList(this);
- }
-
- void sort([int compare(Map a, Map b)]) {
- throw new UnsupportedError("Cannot sort immutable List.");
- }
-
- int indexOf(Map element, [int start = 0]) =>
- Lists.indexOf(this, element, start, this.length);
-
- int lastIndexOf(Map element, [int start]) {
- if (start == null) start = length - 1;
- return Lists.lastIndexOf(this, element, start);
- }
-
- Map get first {
- if (this.length > 0) return this[0];
- throw new StateError("No elements");
- }
-
- Map get last {
- if (this.length > 0) return this[this.length - 1];
- throw new StateError("No elements");
- }
-
- Map get single {
- if (length == 1) return this[0];
- if (length == 0) throw new StateError("No elements");
- throw new StateError("More than one element");
- }
-
- Map min([int compare(Map a, Map b)]) =>
- IterableMixinWorkaround.min(this, compare);
-
- Map max([int compare(Map a, Map b)]) =>
- IterableMixinWorkaround.max(this, compare);
-
- Map removeAt(int pos) {
- throw new UnsupportedError("Cannot remove from immutable List.");
- }
-
- Map removeLast() {
- throw new UnsupportedError("Cannot remove from immutable List.");
- }
-
- void remove(Object object) {
- throw new UnsupportedError("Cannot remove from immutable List.");
- }
-
- void removeAll(Iterable elements) {
- throw new UnsupportedError("Cannot remove from immutable List.");
- }
-
- void retainAll(Iterable elements) {
- throw new UnsupportedError("Cannot remove from immutable List.");
- }
-
- void removeMatching(bool test(Map element)) {
- throw new UnsupportedError("Cannot remove from immutable List.");
- }
-
- void retainMatching(bool test(Map element)) {
- throw new UnsupportedError("Cannot remove from immutable List.");
- }
-
- void setRange(int start, int rangeLength, List<Map> from, [int startFrom]) {
- throw new UnsupportedError("Cannot setRange on immutable List.");
- }
-
- void removeRange(int start, int rangeLength) {
- throw new UnsupportedError("Cannot removeRange on immutable List.");
- }
-
- void insertRange(int start, int rangeLength, [Map initialValue]) {
- throw new UnsupportedError("Cannot insertRange on immutable List.");
- }
-
- List<Map> getRange(int start, int rangeLength) =>
- Lists.getRange(this, start, rangeLength, <Map>[]);
-
- // -- end List<Map> mixins.
-
- @DomName('SQLResultSetRowList.item')
- @DocsEditable
- Map item(int index) native "SQLResultSetRowList_item_Callback";
-
-}
-// 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.
-
-
-@DocsEditable
-@DomName('SQLTransaction')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental
-class SqlTransaction extends NativeFieldWrapperClass1 {
- SqlTransaction.internal();
-
- @DomName('SQLTransaction.executeSql')
- @DocsEditable
- void executeSql(String sqlStatement, List arguments, [SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) native "SQLTransaction_executeSql_Callback";
-
-}
-// 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.
-
-
-@DocsEditable
-@DomName('SQLTransactionSync')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental
-class SqlTransactionSync extends NativeFieldWrapperClass1 {
- SqlTransactionSync.internal();
-
- @DomName('SQLTransactionSync.executeSql')
- @DocsEditable
- SqlResultSet executeSql(String sqlStatement, List arguments) native "SQLTransactionSync_executeSql_Callback";
-
-}
-// 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.
-
/**
* The type used by the
@@ -28662,7 +28204,7 @@ class Window extends EventTarget implements WindowBase {
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
- Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "DOMWindow_openDatabase_Callback";
+ SqlDatabase openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "DOMWindow_openDatabase_Callback";
@DomName('DOMWindow.postMessage')
@DocsEditable
@@ -29077,14 +28619,14 @@ class WorkerContext extends EventTarget {
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
- Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "WorkerContext_openDatabase_Callback";
+ SqlDatabase openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "WorkerContext_openDatabase_Callback";
@DomName('WorkerContext.openDatabaseSync')
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental
- DatabaseSync openDatabaseSync(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "WorkerContext_openDatabaseSync_Callback";
+ SqlDatabaseSync openDatabaseSync(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "WorkerContext_openDatabaseSync_Callback";
@DomName('WorkerContext.removeEventListener')
@DocsEditable
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/web_sql/dart2js/web_sql_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698