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

Side by Side Diff: sdk/lib/web_sql/dartium/web_sql_dartium.dart

Issue 319283003: Refactor dart:_blink into classes to improve startup time (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 6 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
« no previous file with comments | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 @Experimental() // deprecated 94 @Experimental() // deprecated
95 class SqlDatabase extends NativeFieldWrapperClass2 { 95 class SqlDatabase extends NativeFieldWrapperClass2 {
96 // To suppress missing implicit constructor warnings. 96 // To suppress missing implicit constructor warnings.
97 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } 97 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); }
98 98
99 /// Checks if this type is supported on the current platform. 99 /// Checks if this type is supported on the current platform.
100 static bool get supported => true; 100 static bool get supported => true;
101 101
102 @DomName('Database.version') 102 @DomName('Database.version')
103 @DocsEditable() 103 @DocsEditable()
104 String get version => _blink.Native_Database_version_Getter(this); 104 String get version => _blink.BlinkDatabase.$version_Getter(this);
105 105
106 /** 106 /**
107 * Atomically update the database version to [newVersion], asynchronously 107 * Atomically update the database version to [newVersion], asynchronously
108 * running [callback] on the [SqlTransaction] representing this 108 * running [callback] on the [SqlTransaction] representing this
109 * [changeVersion] transaction. 109 * [changeVersion] transaction.
110 * 110 *
111 * If [callback] runs successfully, then [successCallback] is called. 111 * If [callback] runs successfully, then [successCallback] is called.
112 * Otherwise, [errorCallback] is called. 112 * Otherwise, [errorCallback] is called.
113 * 113 *
114 * [oldVersion] should match the database's current [version] exactly. 114 * [oldVersion] should match the database's current [version] exactly.
115 * 115 *
116 * * [Database.changeVersion](http://www.w3.org/TR/webdatabase/#dom-database-c hangeversion) from W3C. 116 * * [Database.changeVersion](http://www.w3.org/TR/webdatabase/#dom-database-c hangeversion) from W3C.
117 */ 117 */
118 @DomName('Database.changeVersion') 118 @DomName('Database.changeVersion')
119 @DocsEditable() 119 @DocsEditable()
120 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall back]) => _blink.Native_Database_changeVersion_Callback(this, oldVersion, newVer sion, callback, errorCallback, successCallback); 120 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall back]) => _blink.BlinkDatabase.$changeVersion_Callback(this, oldVersion, newVers ion, callback, errorCallback, successCallback);
121 121
122 @DomName('Database.readTransaction') 122 @DomName('Database.readTransaction')
123 @DocsEditable() 123 @DocsEditable()
124 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall back errorCallback, VoidCallback successCallback]) => _blink.Native_Database_rea dTransaction_Callback(this, callback, errorCallback, successCallback); 124 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall back errorCallback, VoidCallback successCallback]) => _blink.BlinkDatabase.$read Transaction_Callback(this, callback, errorCallback, successCallback);
125 125
126 @DomName('Database.transaction') 126 @DomName('Database.transaction')
127 @DocsEditable() 127 @DocsEditable()
128 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) => _blink.Native_Database_transac tion_Callback(this, callback, errorCallback, successCallback); 128 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) => _blink.BlinkDatabase.$transact ion_Callback(this, callback, errorCallback, successCallback);
129 129
130 } 130 }
131 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 131 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
132 // for details. All rights reserved. Use of this source code is governed by a 132 // for details. All rights reserved. Use of this source code is governed by a
133 // BSD-style license that can be found in the LICENSE file. 133 // BSD-style license that can be found in the LICENSE file.
134 134
135 // WARNING: Do not edit - generated code. 135 // WARNING: Do not edit - generated code.
136 136
137 137
138 @DocsEditable() 138 @DocsEditable()
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 @DomName('SQLError.UNKNOWN_ERR') 170 @DomName('SQLError.UNKNOWN_ERR')
171 @DocsEditable() 171 @DocsEditable()
172 static const int UNKNOWN_ERR = 0; 172 static const int UNKNOWN_ERR = 0;
173 173
174 @DomName('SQLError.VERSION_ERR') 174 @DomName('SQLError.VERSION_ERR')
175 @DocsEditable() 175 @DocsEditable()
176 static const int VERSION_ERR = 2; 176 static const int VERSION_ERR = 2;
177 177
178 @DomName('SQLError.code') 178 @DomName('SQLError.code')
179 @DocsEditable() 179 @DocsEditable()
180 int get code => _blink.Native_SQLError_code_Getter(this); 180 int get code => _blink.BlinkSQLError.$code_Getter(this);
181 181
182 @DomName('SQLError.message') 182 @DomName('SQLError.message')
183 @DocsEditable() 183 @DocsEditable()
184 String get message => _blink.Native_SQLError_message_Getter(this); 184 String get message => _blink.BlinkSQLError.$message_Getter(this);
185 185
186 } 186 }
187 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 187 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
188 // for details. All rights reserved. Use of this source code is governed by a 188 // for details. All rights reserved. Use of this source code is governed by a
189 // BSD-style license that can be found in the LICENSE file. 189 // BSD-style license that can be found in the LICENSE file.
190 190
191 // WARNING: Do not edit - generated code. 191 // WARNING: Do not edit - generated code.
192 192
193 193
194 @DocsEditable() 194 @DocsEditable()
195 @DomName('SQLResultSet') 195 @DomName('SQLResultSet')
196 // http://www.w3.org/TR/webdatabase/#sqlresultset 196 // http://www.w3.org/TR/webdatabase/#sqlresultset
197 @Experimental() // deprecated 197 @Experimental() // deprecated
198 class SqlResultSet extends NativeFieldWrapperClass2 { 198 class SqlResultSet extends NativeFieldWrapperClass2 {
199 // To suppress missing implicit constructor warnings. 199 // To suppress missing implicit constructor warnings.
200 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } 200 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); }
201 201
202 @DomName('SQLResultSet.insertId') 202 @DomName('SQLResultSet.insertId')
203 @DocsEditable() 203 @DocsEditable()
204 int get insertId => _blink.Native_SQLResultSet_insertId_Getter(this); 204 int get insertId => _blink.BlinkSQLResultSet.$insertId_Getter(this);
205 205
206 @DomName('SQLResultSet.rows') 206 @DomName('SQLResultSet.rows')
207 @DocsEditable() 207 @DocsEditable()
208 SqlResultSetRowList get rows => _blink.Native_SQLResultSet_rows_Getter(this); 208 SqlResultSetRowList get rows => _blink.BlinkSQLResultSet.$rows_Getter(this);
209 209
210 @DomName('SQLResultSet.rowsAffected') 210 @DomName('SQLResultSet.rowsAffected')
211 @DocsEditable() 211 @DocsEditable()
212 int get rowsAffected => _blink.Native_SQLResultSet_rowsAffected_Getter(this); 212 int get rowsAffected => _blink.BlinkSQLResultSet.$rowsAffected_Getter(this);
213 213
214 } 214 }
215 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 215 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
216 // for details. All rights reserved. Use of this source code is governed by a 216 // for details. All rights reserved. Use of this source code is governed by a
217 // BSD-style license that can be found in the LICENSE file. 217 // BSD-style license that can be found in the LICENSE file.
218 218
219 // WARNING: Do not edit - generated code. 219 // WARNING: Do not edit - generated code.
220 220
221 221
222 @DocsEditable() 222 @DocsEditable()
223 @DomName('SQLResultSetRowList') 223 @DomName('SQLResultSetRowList')
224 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist 224 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist
225 @Experimental() // deprecated 225 @Experimental() // deprecated
226 class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> { 226 class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> {
227 // To suppress missing implicit constructor warnings. 227 // To suppress missing implicit constructor warnings.
228 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); } 228 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
229 229
230 @DomName('SQLResultSetRowList.length') 230 @DomName('SQLResultSetRowList.length')
231 @DocsEditable() 231 @DocsEditable()
232 int get length => _blink.Native_SQLResultSetRowList_length_Getter(this); 232 int get length => _blink.BlinkSQLResultSetRowList.$length_Getter(this);
233 233
234 Map operator[](int index) { 234 Map operator[](int index) {
235 if (index < 0 || index >= length) 235 if (index < 0 || index >= length)
236 throw new RangeError.range(index, 0, length); 236 throw new RangeError.range(index, 0, length);
237 return _blink.Native_SQLResultSetRowList_NativeIndexed_Getter(this, index); 237 return _blink.BlinkSQLResultSetRowList.$NativeIndexed_Getter(this, index);
238 } 238 }
239 239
240 Map _nativeIndexedGetter(int index) => _blink.Native_SQLResultSetRowList_Nativ eIndexed_Getter(this, index); 240 Map _nativeIndexedGetter(int index) => _blink.BlinkSQLResultSetRowList.$Native Indexed_Getter(this, index);
241 241
242 void operator[]=(int index, Map value) { 242 void operator[]=(int index, Map value) {
243 throw new UnsupportedError("Cannot assign element of immutable List."); 243 throw new UnsupportedError("Cannot assign element of immutable List.");
244 } 244 }
245 // -- start List<Map> mixins. 245 // -- start List<Map> mixins.
246 // Map is the element type. 246 // Map is the element type.
247 247
248 248
249 void set length(int value) { 249 void set length(int value) {
250 throw new UnsupportedError("Cannot resize immutable List."); 250 throw new UnsupportedError("Cannot resize immutable List.");
(...skipping 21 matching lines...) Expand all
272 } 272 }
273 if (len == 0) throw new StateError("No elements"); 273 if (len == 0) throw new StateError("No elements");
274 throw new StateError("More than one element"); 274 throw new StateError("More than one element");
275 } 275 }
276 276
277 Map elementAt(int index) => this[index]; 277 Map elementAt(int index) => this[index];
278 // -- end List<Map> mixins. 278 // -- end List<Map> mixins.
279 279
280 @DomName('SQLResultSetRowList.item') 280 @DomName('SQLResultSetRowList.item')
281 @DocsEditable() 281 @DocsEditable()
282 Map item(int index) => _blink.Native_SQLResultSetRowList_item_Callback(this, i ndex); 282 Map item(int index) => _blink.BlinkSQLResultSetRowList.$item_Callback(this, in dex);
283 283
284 } 284 }
285 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 285 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
286 // for details. All rights reserved. Use of this source code is governed by a 286 // for details. All rights reserved. Use of this source code is governed by a
287 // BSD-style license that can be found in the LICENSE file. 287 // BSD-style license that can be found in the LICENSE file.
288 288
289 // WARNING: Do not edit - generated code. 289 // WARNING: Do not edit - generated code.
290 290
291 291
292 @DocsEditable() 292 @DocsEditable()
293 @DomName('SQLTransaction') 293 @DomName('SQLTransaction')
294 @SupportedBrowser(SupportedBrowser.CHROME) 294 @SupportedBrowser(SupportedBrowser.CHROME)
295 @SupportedBrowser(SupportedBrowser.SAFARI) 295 @SupportedBrowser(SupportedBrowser.SAFARI)
296 @Experimental() 296 @Experimental()
297 // http://www.w3.org/TR/webdatabase/#sqltransaction 297 // http://www.w3.org/TR/webdatabase/#sqltransaction
298 @deprecated // deprecated 298 @deprecated // deprecated
299 class SqlTransaction extends NativeFieldWrapperClass2 { 299 class SqlTransaction extends NativeFieldWrapperClass2 {
300 // To suppress missing implicit constructor warnings. 300 // To suppress missing implicit constructor warnings.
301 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } 301 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
302 302
303 @DomName('SQLTransaction.executeSql') 303 @DomName('SQLTransaction.executeSql')
304 @DocsEditable() 304 @DocsEditable()
305 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) => _blink.Native_SQLTra nsaction_executeSql_Callback(this, sqlStatement, arguments, callback, errorCallb ack); 305 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans action.$executeSql_Callback(this, sqlStatement, arguments, callback, errorCallba ck);
306 306
307 } 307 }
308 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 308 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
309 // for details. All rights reserved. Use of this source code is governed by a 309 // for details. All rights reserved. Use of this source code is governed by a
310 // BSD-style license that can be found in the LICENSE file. 310 // BSD-style license that can be found in the LICENSE file.
311 311
312 // WARNING: Do not edit - generated code. 312 // WARNING: Do not edit - generated code.
313 313
314 314
315 @DocsEditable() 315 @DocsEditable()
316 @DomName('SQLTransactionSync') 316 @DomName('SQLTransactionSync')
317 @SupportedBrowser(SupportedBrowser.CHROME) 317 @SupportedBrowser(SupportedBrowser.CHROME)
318 @SupportedBrowser(SupportedBrowser.SAFARI) 318 @SupportedBrowser(SupportedBrowser.SAFARI)
319 @Experimental() 319 @Experimental()
320 // http://www.w3.org/TR/webdatabase/#sqltransactionsync 320 // http://www.w3.org/TR/webdatabase/#sqltransactionsync
321 @Experimental() // deprecated 321 @Experimental() // deprecated
322 abstract class _SQLTransactionSync extends NativeFieldWrapperClass2 { 322 abstract class _SQLTransactionSync extends NativeFieldWrapperClass2 {
323 // To suppress missing implicit constructor warnings. 323 // To suppress missing implicit constructor warnings.
324 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); } 324 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); }
325 325
326 } 326 }
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698