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

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

Issue 27033009: Making all base class DOM types throw as well (to prevent a default constructor for DOM types that … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 extends Interceptor native "Database" { 84 class SqlDatabase extends Interceptor native "Database" {
85 // To suppress missing implicit constructor warnings.
86 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); }
85 87
86 /// Checks if this type is supported on the current platform. 88 /// Checks if this type is supported on the current platform.
87 static bool get supported => JS('bool', '!!(window.openDatabase)'); 89 static bool get supported => JS('bool', '!!(window.openDatabase)');
88 90
89 @DomName('Database.version') 91 @DomName('Database.version')
90 @DocsEditable() 92 @DocsEditable()
91 final String version; 93 final String version;
92 94
93 /** 95 /**
94 * Atomically update the database version to [newVersion], asynchronously 96 * Atomically update the database version to [newVersion], asynchronously
(...skipping 22 matching lines...) Expand all
117 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 119 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
118 // for details. All rights reserved. Use of this source code is governed by a 120 // for details. All rights reserved. Use of this source code is governed by a
119 // BSD-style license that can be found in the LICENSE file. 121 // BSD-style license that can be found in the LICENSE file.
120 122
121 123
122 @DocsEditable() 124 @DocsEditable()
123 @DomName('SQLError') 125 @DomName('SQLError')
124 // http://www.w3.org/TR/webdatabase/#sqlerror 126 // http://www.w3.org/TR/webdatabase/#sqlerror
125 @Experimental() // deprecated 127 @Experimental() // deprecated
126 class SqlError extends Interceptor native "SQLError" { 128 class SqlError extends Interceptor native "SQLError" {
129 // To suppress missing implicit constructor warnings.
130 factory SqlError._() { throw new UnsupportedError("Not supported"); }
127 131
128 @DomName('SQLError.CONSTRAINT_ERR') 132 @DomName('SQLError.CONSTRAINT_ERR')
129 @DocsEditable() 133 @DocsEditable()
130 static const int CONSTRAINT_ERR = 6; 134 static const int CONSTRAINT_ERR = 6;
131 135
132 @DomName('SQLError.DATABASE_ERR') 136 @DomName('SQLError.DATABASE_ERR')
133 @DocsEditable() 137 @DocsEditable()
134 static const int DATABASE_ERR = 1; 138 static const int DATABASE_ERR = 1;
135 139
136 @DomName('SQLError.QUOTA_ERR') 140 @DomName('SQLError.QUOTA_ERR')
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 172 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
169 // for details. All rights reserved. Use of this source code is governed by a 173 // for details. All rights reserved. Use of this source code is governed by a
170 // BSD-style license that can be found in the LICENSE file. 174 // BSD-style license that can be found in the LICENSE file.
171 175
172 176
173 @DocsEditable() 177 @DocsEditable()
174 @DomName('SQLResultSet') 178 @DomName('SQLResultSet')
175 // http://www.w3.org/TR/webdatabase/#sqlresultset 179 // http://www.w3.org/TR/webdatabase/#sqlresultset
176 @Experimental() // deprecated 180 @Experimental() // deprecated
177 class SqlResultSet extends Interceptor native "SQLResultSet" { 181 class SqlResultSet extends Interceptor native "SQLResultSet" {
182 // To suppress missing implicit constructor warnings.
183 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); }
178 184
179 @DomName('SQLResultSet.insertId') 185 @DomName('SQLResultSet.insertId')
180 @DocsEditable() 186 @DocsEditable()
181 final int insertId; 187 final int insertId;
182 188
183 @DomName('SQLResultSet.rows') 189 @DomName('SQLResultSet.rows')
184 @DocsEditable() 190 @DocsEditable()
185 final SqlResultSetRowList rows; 191 final SqlResultSetRowList rows;
186 192
187 @DomName('SQLResultSet.rowsAffected') 193 @DomName('SQLResultSet.rowsAffected')
188 @DocsEditable() 194 @DocsEditable()
189 final int rowsAffected; 195 final int rowsAffected;
190 } 196 }
191 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 197 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
192 // for details. All rights reserved. Use of this source code is governed by a 198 // for details. All rights reserved. Use of this source code is governed by a
193 // BSD-style license that can be found in the LICENSE file. 199 // BSD-style license that can be found in the LICENSE file.
194 200
195 201
196 @DocsEditable() 202 @DocsEditable()
197 @DomName('SQLResultSetRowList') 203 @DomName('SQLResultSetRowList')
198 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist 204 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist
199 @Experimental() // deprecated 205 @Experimental() // deprecated
200 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList Mixin<Map> implements List native "SQLResultSetRowList" { 206 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList Mixin<Map> implements List native "SQLResultSetRowList" {
207 // To suppress missing implicit constructor warnings.
208 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
201 209
202 @DomName('SQLResultSetRowList.length') 210 @DomName('SQLResultSetRowList.length')
203 @DocsEditable() 211 @DocsEditable()
204 int get length => JS("int", "#.length", this); 212 int get length => JS("int", "#.length", this);
205 213
206 Map operator[](int index) { 214 Map operator[](int index) {
207 if (JS("bool", "# >>> 0 !== # || # >= #", index, 215 if (JS("bool", "# >>> 0 !== # || # >= #", index,
208 index, index, length)) 216 index, index, length))
209 throw new RangeError.range(index, 0, length); 217 throw new RangeError.range(index, 0, length);
210 return this.item(index); 218 return this.item(index);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 273
266 274
267 @DocsEditable() 275 @DocsEditable()
268 @DomName('SQLTransaction') 276 @DomName('SQLTransaction')
269 @SupportedBrowser(SupportedBrowser.CHROME) 277 @SupportedBrowser(SupportedBrowser.CHROME)
270 @SupportedBrowser(SupportedBrowser.SAFARI) 278 @SupportedBrowser(SupportedBrowser.SAFARI)
271 @Experimental() 279 @Experimental()
272 // http://www.w3.org/TR/webdatabase/#sqltransaction 280 // http://www.w3.org/TR/webdatabase/#sqltransaction
273 @deprecated // deprecated 281 @deprecated // deprecated
274 class SqlTransaction extends Interceptor native "SQLTransaction" { 282 class SqlTransaction extends Interceptor native "SQLTransaction" {
283 // To suppress missing implicit constructor warnings.
284 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
275 285
276 @DomName('SQLTransaction.executeSql') 286 @DomName('SQLTransaction.executeSql')
277 @DocsEditable() 287 @DocsEditable()
278 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal lback, SqlStatementErrorCallback errorCallback]) native; 288 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal lback, SqlStatementErrorCallback errorCallback]) native;
279 } 289 }
280 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 290 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
281 // for details. All rights reserved. Use of this source code is governed by a 291 // for details. All rights reserved. Use of this source code is governed by a
282 // BSD-style license that can be found in the LICENSE file. 292 // BSD-style license that can be found in the LICENSE file.
283 293
284 294
285 @DocsEditable() 295 @DocsEditable()
286 @DomName('SQLTransactionSync') 296 @DomName('SQLTransactionSync')
287 @SupportedBrowser(SupportedBrowser.CHROME) 297 @SupportedBrowser(SupportedBrowser.CHROME)
288 @SupportedBrowser(SupportedBrowser.SAFARI) 298 @SupportedBrowser(SupportedBrowser.SAFARI)
289 @Experimental() 299 @Experimental()
290 // http://www.w3.org/TR/webdatabase/#sqltransactionsync 300 // http://www.w3.org/TR/webdatabase/#sqltransactionsync
291 @Experimental() // deprecated 301 @Experimental() // deprecated
292 abstract class _SQLTransactionSync extends Interceptor native "SQLTransactionSyn c" { 302 abstract class _SQLTransactionSync extends Interceptor native "SQLTransactionSyn c" {
303 // To suppress missing implicit constructor warnings.
304 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); }
293 } 305 }
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