Index: sdk/lib/web_sql/dartium/web_sql_dartium.dart |
diff --git a/sdk/lib/web_sql/dartium/web_sql_dartium.dart b/sdk/lib/web_sql/dartium/web_sql_dartium.dart |
index c6fd41a51abe19c8a7bd700ad51b2be44213ab0b..540f88dce0e0eb0c00e79afdf7d1dd79c1faf590 100644 |
--- a/sdk/lib/web_sql/dartium/web_sql_dartium.dart |
+++ b/sdk/lib/web_sql/dartium/web_sql_dartium.dart |
@@ -17,19 +17,12 @@ import 'dart:html'; |
import 'dart:html_common'; |
import 'dart:nativewrappers'; |
import 'dart:_blink' as _blink; |
-import 'dart:js' as js; |
- |
// DO NOT EDIT - unless you are editing documentation as per: |
// https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation |
// Auto-generated dart:audio library. |
-// Need a default constructor for constructing classes with mixins that are |
-// also extending NativeFieldWrapperClass2. Defining JsoNativeFieldWrapper |
-// extending NativeFieldWrapperClass2 creates a default constructor. |
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {} |
- |
// FIXME: Can we make this private? |
final web_sqlBlinkMap = { |
@@ -41,15 +34,6 @@ final web_sqlBlinkMap = { |
}; |
-// FIXME: Can we make this private? |
-final web_sqlBlinkFunctionMap = { |
- 'Database': () => SqlDatabase.internalCreateSqlDatabase, |
- 'SQLError': () => SqlError.internalCreateSqlError, |
- 'SQLResultSet': () => SqlResultSet.internalCreateSqlResultSet, |
- 'SQLResultSetRowList': () => SqlResultSetRowList.internalCreateSqlResultSetRowList, |
- 'SQLTransaction': () => SqlTransaction.internalCreateSqlTransaction, |
- |
-}; |
// 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. |
@@ -112,21 +96,6 @@ class SqlDatabase extends NativeFieldWrapperClass2 { |
// To suppress missing implicit constructor warnings. |
factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } |
- static SqlDatabase internalCreateSqlDatabase() { |
- return new SqlDatabase._internalWrap(); |
- } |
- |
- js.JsObject blink_jsObject; |
- |
- factory SqlDatabase._internalWrap() { |
- return new SqlDatabase.internal_(); |
- } |
- |
- SqlDatabase.internal_() { } |
- |
- bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); |
- int get hashCode => unwrap_jso(this).hashCode; |
- |
/// Checks if this type is supported on the current platform. |
static bool get supported => true; |
@@ -136,15 +105,15 @@ class SqlDatabase extends NativeFieldWrapperClass2 { |
void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallback callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) { |
if (successCallback != null) { |
- _blink.BlinkDatabase.instance.changeVersion_Callback_5_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))), unwrap_jso(() => successCallback())); |
+ _blink.BlinkDatabase.instance.changeVersion_Callback_5_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso(callback), unwrap_jso(errorCallback), unwrap_jso(successCallback)); |
return; |
} |
if (errorCallback != null) { |
- _blink.BlinkDatabase.instance.changeVersion_Callback_4_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error)))); |
+ _blink.BlinkDatabase.instance.changeVersion_Callback_4_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso(callback), unwrap_jso(errorCallback)); |
return; |
} |
if (callback != null) { |
- _blink.BlinkDatabase.instance.changeVersion_Callback_3_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso((transaction) => callback(wrap_jso(transaction)))); |
+ _blink.BlinkDatabase.instance.changeVersion_Callback_3_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso(callback)); |
return; |
} |
_blink.BlinkDatabase.instance.changeVersion_Callback_2_(unwrap_jso(this), oldVersion, newVersion); |
@@ -153,27 +122,27 @@ class SqlDatabase extends NativeFieldWrapperClass2 { |
void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) { |
if (successCallback != null) { |
- _blink.BlinkDatabase.instance.readTransaction_Callback_3_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))), unwrap_jso(() => successCallback())); |
+ _blink.BlinkDatabase.instance.readTransaction_Callback_3_(unwrap_jso(this), unwrap_jso(callback), unwrap_jso(errorCallback), unwrap_jso(successCallback)); |
return; |
} |
if (errorCallback != null) { |
- _blink.BlinkDatabase.instance.readTransaction_Callback_2_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error)))); |
+ _blink.BlinkDatabase.instance.readTransaction_Callback_2_(unwrap_jso(this), unwrap_jso(callback), unwrap_jso(errorCallback)); |
return; |
} |
- _blink.BlinkDatabase.instance.readTransaction_Callback_1_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction)))); |
+ _blink.BlinkDatabase.instance.readTransaction_Callback_1_(unwrap_jso(this), unwrap_jso(callback)); |
return; |
} |
void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) { |
if (successCallback != null) { |
- _blink.BlinkDatabase.instance.transaction_Callback_3_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))), unwrap_jso(() => successCallback())); |
+ _blink.BlinkDatabase.instance.transaction_Callback_3_(unwrap_jso(this), unwrap_jso(callback), unwrap_jso(errorCallback), unwrap_jso(successCallback)); |
return; |
} |
if (errorCallback != null) { |
- _blink.BlinkDatabase.instance.transaction_Callback_2_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error)))); |
+ _blink.BlinkDatabase.instance.transaction_Callback_2_(unwrap_jso(this), unwrap_jso(callback), unwrap_jso(errorCallback)); |
return; |
} |
- _blink.BlinkDatabase.instance.transaction_Callback_1_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction)))); |
+ _blink.BlinkDatabase.instance.transaction_Callback_1_(unwrap_jso(this), unwrap_jso(callback)); |
return; |
} |
@@ -193,21 +162,6 @@ class SqlError extends NativeFieldWrapperClass2 { |
// To suppress missing implicit constructor warnings. |
factory SqlError._() { throw new UnsupportedError("Not supported"); } |
- static SqlError internalCreateSqlError() { |
- return new SqlError._internalWrap(); |
- } |
- |
- js.JsObject blink_jsObject; |
- |
- factory SqlError._internalWrap() { |
- return new SqlError.internal_(); |
- } |
- |
- SqlError.internal_() { } |
- |
- bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); |
- int get hashCode => unwrap_jso(this).hashCode; |
- |
@DomName('SQLError.CONSTRAINT_ERR') |
@DocsEditable() |
static const int CONSTRAINT_ERR = 6; |
@@ -264,21 +218,6 @@ class SqlResultSet extends NativeFieldWrapperClass2 { |
// To suppress missing implicit constructor warnings. |
factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } |
- static SqlResultSet internalCreateSqlResultSet() { |
- return new SqlResultSet._internalWrap(); |
- } |
- |
- js.JsObject blink_jsObject; |
- |
- factory SqlResultSet._internalWrap() { |
- return new SqlResultSet.internal_(); |
- } |
- |
- SqlResultSet.internal_() { } |
- |
- bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); |
- int get hashCode => unwrap_jso(this).hashCode; |
- |
@DomName('SQLResultSet.insertId') |
@DocsEditable() |
int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(unwrap_jso(this)); |
@@ -303,25 +242,10 @@ class SqlResultSet extends NativeFieldWrapperClass2 { |
@DomName('SQLResultSetRowList') |
// http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist |
@Experimental() // deprecated |
-class SqlResultSetRowList extends JsoNativeFieldWrapper with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> { |
+class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> { |
// To suppress missing implicit constructor warnings. |
factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); } |
- static SqlResultSetRowList internalCreateSqlResultSetRowList() { |
- return new SqlResultSetRowList._internalWrap(); |
- } |
- |
- js.JsObject blink_jsObject; |
- |
- factory SqlResultSetRowList._internalWrap() { |
- return new SqlResultSetRowList.internal_(); |
- } |
- |
- SqlResultSetRowList.internal_() { } |
- |
- bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); |
- int get hashCode => unwrap_jso(this).hashCode; |
- |
@DomName('SQLResultSetRowList.length') |
@DocsEditable() |
int get length => _blink.BlinkSQLResultSetRowList.instance.length_Getter_(unwrap_jso(this)); |
@@ -329,11 +253,11 @@ class SqlResultSetRowList extends JsoNativeFieldWrapper with ListMixin<Map>, Imm |
Map operator[](int index) { |
if (index < 0 || index >= length) |
throw new RangeError.index(index, this); |
- return wrap_jso(_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index)); |
+ return _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index); |
} |
- Map _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index)); |
- |
+ Map _nativeIndexedGetter(int index) => _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index); |
+ |
void operator[]=(int index, Map value) { |
throw new UnsupportedError("Cannot assign element of immutable List."); |
} |
@@ -341,7 +265,7 @@ class SqlResultSetRowList extends JsoNativeFieldWrapper with ListMixin<Map>, Imm |
// Map is the element type. |
- set length(int value) { |
+ void set length(int value) { |
throw new UnsupportedError("Cannot resize immutable List."); |
} |
@@ -374,7 +298,7 @@ class SqlResultSetRowList extends JsoNativeFieldWrapper with ListMixin<Map>, Imm |
@DomName('SQLResultSetRowList.item') |
@DocsEditable() |
- Map item(int index) => wrap_jso(_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index)); |
+ Map item(int index) => _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index); |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
@@ -395,23 +319,8 @@ class SqlTransaction extends NativeFieldWrapperClass2 { |
// To suppress missing implicit constructor warnings. |
factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } |
- static SqlTransaction internalCreateSqlTransaction() { |
- return new SqlTransaction._internalWrap(); |
- } |
- |
- js.JsObject blink_jsObject; |
- |
- factory SqlTransaction._internalWrap() { |
- return new SqlTransaction.internal_(); |
- } |
- |
- SqlTransaction.internal_() { } |
- |
- bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other); |
- int get hashCode => unwrap_jso(this).hashCode; |
- |
@DomName('SQLTransaction.executeSql') |
@DocsEditable() |
- void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTransaction.instance.executeSql_Callback_4_(unwrap_jso(this), sqlStatement, arguments, unwrap_jso((transaction, resultSet) => callback(wrap_jso(transaction), wrap_jso(resultSet))), unwrap_jso((transaction, error) => errorCallback(wrap_jso(transaction), wrap_jso(error)))); |
+ void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTransaction.instance.executeSql_Callback_4_(unwrap_jso(this), sqlStatement, arguments, unwrap_jso(callback), unwrap_jso(errorCallback)); |
} |