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

Side by Side Diff: sdk/lib/web_sql/dart2js/web_sql_dart2js.dart

Issue 17508002: Revert "Making all DOM types abstract and removing superfluous Dartium constructors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 /** 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 76
77 @DocsEditable 77 @DocsEditable
78 @DomName('Database') 78 @DomName('Database')
79 @SupportedBrowser(SupportedBrowser.CHROME) 79 @SupportedBrowser(SupportedBrowser.CHROME)
80 @SupportedBrowser(SupportedBrowser.SAFARI) 80 @SupportedBrowser(SupportedBrowser.SAFARI)
81 @Experimental 81 @Experimental
82 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api 82 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api
83 @Experimental // deprecated 83 @Experimental // deprecated
84 class SqlDatabase native "Database" { 84 class SqlDatabase native "Database" {
85 // To suppress missing implicit constructor warnings.
86 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); }
87 85
88 /// Checks if this type is supported on the current platform. 86 /// Checks if this type is supported on the current platform.
89 static bool get supported => JS('bool', '!!(window.openDatabase)'); 87 static bool get supported => JS('bool', '!!(window.openDatabase)');
90 88
91 @DomName('Database.version') 89 @DomName('Database.version')
92 @DocsEditable 90 @DocsEditable
93 final String version; 91 final String version;
94 92
95 /** 93 /**
96 * Atomically update the database version to [newVersion], asynchronously 94 * Atomically update the database version to [newVersion], asynchronously
(...skipping 22 matching lines...) Expand all
119 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 117 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
120 // for details. All rights reserved. Use of this source code is governed by a 118 // for details. All rights reserved. Use of this source code is governed by a
121 // BSD-style license that can be found in the LICENSE file. 119 // BSD-style license that can be found in the LICENSE file.
122 120
123 121
124 @DocsEditable 122 @DocsEditable
125 @DomName('SQLError') 123 @DomName('SQLError')
126 // http://www.w3.org/TR/webdatabase/#sqlerror 124 // http://www.w3.org/TR/webdatabase/#sqlerror
127 @Experimental // deprecated 125 @Experimental // deprecated
128 class SqlError native "SQLError" { 126 class SqlError native "SQLError" {
129 // To suppress missing implicit constructor warnings.
130 factory SqlError._() { throw new UnsupportedError("Not supported"); }
131 127
132 @DomName('SQLError.CONSTRAINT_ERR') 128 @DomName('SQLError.CONSTRAINT_ERR')
133 @DocsEditable 129 @DocsEditable
134 static const int CONSTRAINT_ERR = 6; 130 static const int CONSTRAINT_ERR = 6;
135 131
136 @DomName('SQLError.DATABASE_ERR') 132 @DomName('SQLError.DATABASE_ERR')
137 @DocsEditable 133 @DocsEditable
138 static const int DATABASE_ERR = 1; 134 static const int DATABASE_ERR = 1;
139 135
140 @DomName('SQLError.QUOTA_ERR') 136 @DomName('SQLError.QUOTA_ERR')
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 168 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
173 // for details. All rights reserved. Use of this source code is governed by a 169 // for details. All rights reserved. Use of this source code is governed by a
174 // BSD-style license that can be found in the LICENSE file. 170 // BSD-style license that can be found in the LICENSE file.
175 171
176 172
177 @DocsEditable 173 @DocsEditable
178 @DomName('SQLException') 174 @DomName('SQLException')
179 // http://www.w3.org/TR/webdatabase/#sqlexception 175 // http://www.w3.org/TR/webdatabase/#sqlexception
180 @Experimental // deprecated 176 @Experimental // deprecated
181 class SqlException native "SQLException" { 177 class SqlException native "SQLException" {
182 // To suppress missing implicit constructor warnings.
183 factory SqlException._() { throw new UnsupportedError("Not supported"); }
184 178
185 @DomName('SQLException.CONSTRAINT_ERR') 179 @DomName('SQLException.CONSTRAINT_ERR')
186 @DocsEditable 180 @DocsEditable
187 static const int CONSTRAINT_ERR = 6; 181 static const int CONSTRAINT_ERR = 6;
188 182
189 @DomName('SQLException.DATABASE_ERR') 183 @DomName('SQLException.DATABASE_ERR')
190 @DocsEditable 184 @DocsEditable
191 static const int DATABASE_ERR = 1; 185 static const int DATABASE_ERR = 1;
192 186
193 @DomName('SQLException.QUOTA_ERR') 187 @DomName('SQLException.QUOTA_ERR')
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 219 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
226 // for details. All rights reserved. Use of this source code is governed by a 220 // for details. All rights reserved. Use of this source code is governed by a
227 // BSD-style license that can be found in the LICENSE file. 221 // BSD-style license that can be found in the LICENSE file.
228 222
229 223
230 @DocsEditable 224 @DocsEditable
231 @DomName('SQLResultSet') 225 @DomName('SQLResultSet')
232 // http://www.w3.org/TR/webdatabase/#sqlresultset 226 // http://www.w3.org/TR/webdatabase/#sqlresultset
233 @Experimental // deprecated 227 @Experimental // deprecated
234 class SqlResultSet native "SQLResultSet" { 228 class SqlResultSet native "SQLResultSet" {
235 // To suppress missing implicit constructor warnings.
236 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); }
237 229
238 @DomName('SQLResultSet.insertId') 230 @DomName('SQLResultSet.insertId')
239 @DocsEditable 231 @DocsEditable
240 final int insertId; 232 final int insertId;
241 233
242 @DomName('SQLResultSet.rows') 234 @DomName('SQLResultSet.rows')
243 @DocsEditable 235 @DocsEditable
244 final SqlResultSetRowList rows; 236 final SqlResultSetRowList rows;
245 237
246 @DomName('SQLResultSet.rowsAffected') 238 @DomName('SQLResultSet.rowsAffected')
247 @DocsEditable 239 @DocsEditable
248 final int rowsAffected; 240 final int rowsAffected;
249 } 241 }
250 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 242 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
251 // for details. All rights reserved. Use of this source code is governed by a 243 // for details. All rights reserved. Use of this source code is governed by a
252 // BSD-style license that can be found in the LICENSE file. 244 // BSD-style license that can be found in the LICENSE file.
253 245
254 246
255 @DocsEditable 247 @DocsEditable
256 @DomName('SQLResultSetRowList') 248 @DomName('SQLResultSetRowList')
257 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist 249 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist
258 @Experimental // deprecated 250 @Experimental // deprecated
259 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList Mixin<Map> implements JavaScriptIndexingBehavior, List<Map> native "SQLResultSet RowList" { 251 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList Mixin<Map> implements JavaScriptIndexingBehavior, List<Map> native "SQLResultSet RowList" {
260 // To suppress missing implicit constructor warnings.
261 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
262 252
263 @DomName('SQLResultSetRowList.length') 253 @DomName('SQLResultSetRowList.length')
264 @DocsEditable 254 @DocsEditable
265 int get length => JS("int", "#.length", this); 255 int get length => JS("int", "#.length", this);
266 256
267 Map operator[](int index) { 257 Map operator[](int index) {
268 if (JS("bool", "# >>> 0 !== # || # >= #", index, 258 if (JS("bool", "# >>> 0 !== # || # >= #", index,
269 index, index, length)) 259 index, index, length))
270 throw new RangeError.range(index, 0, length); 260 throw new RangeError.range(index, 0, length);
271 return this.item(index); 261 return this.item(index);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 316
327 317
328 @DocsEditable 318 @DocsEditable
329 @DomName('SQLTransaction') 319 @DomName('SQLTransaction')
330 @SupportedBrowser(SupportedBrowser.CHROME) 320 @SupportedBrowser(SupportedBrowser.CHROME)
331 @SupportedBrowser(SupportedBrowser.SAFARI) 321 @SupportedBrowser(SupportedBrowser.SAFARI)
332 @Experimental 322 @Experimental
333 // http://www.w3.org/TR/webdatabase/#sqltransaction 323 // http://www.w3.org/TR/webdatabase/#sqltransaction
334 @deprecated // deprecated 324 @deprecated // deprecated
335 class SqlTransaction native "SQLTransaction" { 325 class SqlTransaction native "SQLTransaction" {
336 // To suppress missing implicit constructor warnings.
337 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
338 326
339 @DomName('SQLTransaction.executeSql') 327 @DomName('SQLTransaction.executeSql')
340 @DocsEditable 328 @DocsEditable
341 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal lback, SqlStatementErrorCallback errorCallback]) native; 329 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal lback, SqlStatementErrorCallback errorCallback]) native;
342 } 330 }
343 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 331 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
344 // for details. All rights reserved. Use of this source code is governed by a 332 // for details. All rights reserved. Use of this source code is governed by a
345 // BSD-style license that can be found in the LICENSE file. 333 // BSD-style license that can be found in the LICENSE file.
346 334
347 335
348 @DocsEditable 336 @DocsEditable
349 @DomName('SQLTransactionSync') 337 @DomName('SQLTransactionSync')
350 @SupportedBrowser(SupportedBrowser.CHROME) 338 @SupportedBrowser(SupportedBrowser.CHROME)
351 @SupportedBrowser(SupportedBrowser.SAFARI) 339 @SupportedBrowser(SupportedBrowser.SAFARI)
352 @Experimental 340 @Experimental
353 // http://www.w3.org/TR/webdatabase/#sqltransactionsync 341 // http://www.w3.org/TR/webdatabase/#sqltransactionsync
354 @Experimental // deprecated 342 @Experimental // deprecated
355 abstract class _SQLTransactionSync native "SQLTransactionSync" { 343 abstract class _SQLTransactionSync native "SQLTransactionSync" {
356 // To suppress missing implicit constructor warnings.
357 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); }
358 } 344 }
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | sdk/lib/web_sql/dartium/web_sql_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698