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

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

Issue 684783005: Redirect blink calls through instance (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/systemnative.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.BlinkDatabase.version_Getter(this); 104 String get version => _blink.BlinkDatabase.instance.version_Getter_(this);
105 105
106 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall back]) { 106 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall back]) {
107 if (successCallback != null) { 107 if (successCallback != null) {
108 _blink.BlinkDatabase.changeVersion_Callback_5(this, oldVersion, newVersion , callback, errorCallback, successCallback); 108 _blink.BlinkDatabase.instance.changeVersion_Callback_5_(this, oldVersion, newVersion, callback, errorCallback, successCallback);
109 return; 109 return;
110 } 110 }
111 if (errorCallback != null) { 111 if (errorCallback != null) {
112 _blink.BlinkDatabase.changeVersion_Callback_4(this, oldVersion, newVersion , callback, errorCallback); 112 _blink.BlinkDatabase.instance.changeVersion_Callback_4_(this, oldVersion, newVersion, callback, errorCallback);
113 return; 113 return;
114 } 114 }
115 if (callback != null) { 115 if (callback != null) {
116 _blink.BlinkDatabase.changeVersion_Callback_3(this, oldVersion, newVersion , callback); 116 _blink.BlinkDatabase.instance.changeVersion_Callback_3_(this, oldVersion, newVersion, callback);
117 return; 117 return;
118 } 118 }
119 _blink.BlinkDatabase.changeVersion_Callback_2(this, oldVersion, newVersion); 119 _blink.BlinkDatabase.instance.changeVersion_Callback_2_(this, oldVersion, ne wVersion);
120 return; 120 return;
121 } 121 }
122 122
123 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall back errorCallback, VoidCallback successCallback]) { 123 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall back errorCallback, VoidCallback successCallback]) {
124 if (successCallback != null) { 124 if (successCallback != null) {
125 _blink.BlinkDatabase.readTransaction_Callback_3(this, callback, errorCallb ack, successCallback); 125 _blink.BlinkDatabase.instance.readTransaction_Callback_3_(this, callback, errorCallback, successCallback);
126 return; 126 return;
127 } 127 }
128 if (errorCallback != null) { 128 if (errorCallback != null) {
129 _blink.BlinkDatabase.readTransaction_Callback_2(this, callback, errorCallb ack); 129 _blink.BlinkDatabase.instance.readTransaction_Callback_2_(this, callback, errorCallback);
130 return; 130 return;
131 } 131 }
132 _blink.BlinkDatabase.readTransaction_Callback_1(this, callback); 132 _blink.BlinkDatabase.instance.readTransaction_Callback_1_(this, callback);
133 return; 133 return;
134 } 134 }
135 135
136 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) { 136 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) {
137 if (successCallback != null) { 137 if (successCallback != null) {
138 _blink.BlinkDatabase.transaction_Callback_3(this, callback, errorCallback, successCallback); 138 _blink.BlinkDatabase.instance.transaction_Callback_3_(this, callback, erro rCallback, successCallback);
139 return; 139 return;
140 } 140 }
141 if (errorCallback != null) { 141 if (errorCallback != null) {
142 _blink.BlinkDatabase.transaction_Callback_2(this, callback, errorCallback) ; 142 _blink.BlinkDatabase.instance.transaction_Callback_2_(this, callback, erro rCallback);
143 return; 143 return;
144 } 144 }
145 _blink.BlinkDatabase.transaction_Callback_1(this, callback); 145 _blink.BlinkDatabase.instance.transaction_Callback_1_(this, callback);
146 return; 146 return;
147 } 147 }
148 148
149 } 149 }
150 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 150 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
151 // for details. All rights reserved. Use of this source code is governed by a 151 // for details. All rights reserved. Use of this source code is governed by a
152 // BSD-style license that can be found in the LICENSE file. 152 // BSD-style license that can be found in the LICENSE file.
153 153
154 // WARNING: Do not edit - generated code. 154 // WARNING: Do not edit - generated code.
155 155
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 @DomName('SQLError.UNKNOWN_ERR') 189 @DomName('SQLError.UNKNOWN_ERR')
190 @DocsEditable() 190 @DocsEditable()
191 static const int UNKNOWN_ERR = 0; 191 static const int UNKNOWN_ERR = 0;
192 192
193 @DomName('SQLError.VERSION_ERR') 193 @DomName('SQLError.VERSION_ERR')
194 @DocsEditable() 194 @DocsEditable()
195 static const int VERSION_ERR = 2; 195 static const int VERSION_ERR = 2;
196 196
197 @DomName('SQLError.code') 197 @DomName('SQLError.code')
198 @DocsEditable() 198 @DocsEditable()
199 int get code => _blink.BlinkSQLError.code_Getter(this); 199 int get code => _blink.BlinkSQLError.instance.code_Getter_(this);
200 200
201 @DomName('SQLError.message') 201 @DomName('SQLError.message')
202 @DocsEditable() 202 @DocsEditable()
203 String get message => _blink.BlinkSQLError.message_Getter(this); 203 String get message => _blink.BlinkSQLError.instance.message_Getter_(this);
204 204
205 } 205 }
206 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 206 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
207 // for details. All rights reserved. Use of this source code is governed by a 207 // for details. All rights reserved. Use of this source code is governed by a
208 // BSD-style license that can be found in the LICENSE file. 208 // BSD-style license that can be found in the LICENSE file.
209 209
210 // WARNING: Do not edit - generated code. 210 // WARNING: Do not edit - generated code.
211 211
212 212
213 @DocsEditable() 213 @DocsEditable()
214 @DomName('SQLResultSet') 214 @DomName('SQLResultSet')
215 // http://www.w3.org/TR/webdatabase/#sqlresultset 215 // http://www.w3.org/TR/webdatabase/#sqlresultset
216 @Experimental() // deprecated 216 @Experimental() // deprecated
217 class SqlResultSet extends NativeFieldWrapperClass2 { 217 class SqlResultSet extends NativeFieldWrapperClass2 {
218 // To suppress missing implicit constructor warnings. 218 // To suppress missing implicit constructor warnings.
219 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } 219 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); }
220 220
221 @DomName('SQLResultSet.insertId') 221 @DomName('SQLResultSet.insertId')
222 @DocsEditable() 222 @DocsEditable()
223 int get insertId => _blink.BlinkSQLResultSet.insertId_Getter(this); 223 int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(this);
224 224
225 @DomName('SQLResultSet.rows') 225 @DomName('SQLResultSet.rows')
226 @DocsEditable() 226 @DocsEditable()
227 SqlResultSetRowList get rows => _blink.BlinkSQLResultSet.rows_Getter(this); 227 SqlResultSetRowList get rows => _blink.BlinkSQLResultSet.instance.rows_Getter_ (this);
228 228
229 @DomName('SQLResultSet.rowsAffected') 229 @DomName('SQLResultSet.rowsAffected')
230 @DocsEditable() 230 @DocsEditable()
231 int get rowsAffected => _blink.BlinkSQLResultSet.rowsAffected_Getter(this); 231 int get rowsAffected => _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_ (this);
232 232
233 } 233 }
234 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 234 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
235 // for details. All rights reserved. Use of this source code is governed by a 235 // for details. All rights reserved. Use of this source code is governed by a
236 // BSD-style license that can be found in the LICENSE file. 236 // BSD-style license that can be found in the LICENSE file.
237 237
238 // WARNING: Do not edit - generated code. 238 // WARNING: Do not edit - generated code.
239 239
240 240
241 @DocsEditable() 241 @DocsEditable()
242 @DomName('SQLResultSetRowList') 242 @DomName('SQLResultSetRowList')
243 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist 243 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist
244 @Experimental() // deprecated 244 @Experimental() // deprecated
245 class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> { 245 class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> {
246 // To suppress missing implicit constructor warnings. 246 // To suppress missing implicit constructor warnings.
247 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); } 247 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
248 248
249 @DomName('SQLResultSetRowList.length') 249 @DomName('SQLResultSetRowList.length')
250 @DocsEditable() 250 @DocsEditable()
251 int get length => _blink.BlinkSQLResultSetRowList.length_Getter(this); 251 int get length => _blink.BlinkSQLResultSetRowList.instance.length_Getter_(this );
252 252
253 Map operator[](int index) { 253 Map operator[](int index) {
254 if (index < 0 || index >= length) 254 if (index < 0 || index >= length)
255 throw new RangeError.range(index, 0, length); 255 throw new RangeError.range(index, 0, length);
256 return _blink.BlinkSQLResultSetRowList.item_Callback_1(this, index); 256 return _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(this, index );
257 } 257 }
258 258
259 Map _nativeIndexedGetter(int index) => _blink.BlinkSQLResultSetRowList.item_Ca llback_1(this, index); 259 Map _nativeIndexedGetter(int index) => _blink.BlinkSQLResultSetRowList.instanc e.item_Callback_1_(this, index);
260 260
261 void operator[]=(int index, Map value) { 261 void operator[]=(int index, Map value) {
262 throw new UnsupportedError("Cannot assign element of immutable List."); 262 throw new UnsupportedError("Cannot assign element of immutable List.");
263 } 263 }
264 // -- start List<Map> mixins. 264 // -- start List<Map> mixins.
265 // Map is the element type. 265 // Map is the element type.
266 266
267 267
268 void set length(int value) { 268 void set length(int value) {
269 throw new UnsupportedError("Cannot resize immutable List."); 269 throw new UnsupportedError("Cannot resize immutable List.");
(...skipping 21 matching lines...) Expand all
291 } 291 }
292 if (len == 0) throw new StateError("No elements"); 292 if (len == 0) throw new StateError("No elements");
293 throw new StateError("More than one element"); 293 throw new StateError("More than one element");
294 } 294 }
295 295
296 Map elementAt(int index) => this[index]; 296 Map elementAt(int index) => this[index];
297 // -- end List<Map> mixins. 297 // -- end List<Map> mixins.
298 298
299 @DomName('SQLResultSetRowList.item') 299 @DomName('SQLResultSetRowList.item')
300 @DocsEditable() 300 @DocsEditable()
301 Map item(int index) => _blink.BlinkSQLResultSetRowList.item_Callback_1(this, i ndex); 301 Map item(int index) => _blink.BlinkSQLResultSetRowList.instance.item_Callback_ 1_(this, index);
302 302
303 } 303 }
304 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 304 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
305 // for details. All rights reserved. Use of this source code is governed by a 305 // for details. All rights reserved. Use of this source code is governed by a
306 // BSD-style license that can be found in the LICENSE file. 306 // BSD-style license that can be found in the LICENSE file.
307 307
308 // WARNING: Do not edit - generated code. 308 // WARNING: Do not edit - generated code.
309 309
310 310
311 @DocsEditable() 311 @DocsEditable()
312 @DomName('SQLTransaction') 312 @DomName('SQLTransaction')
313 @SupportedBrowser(SupportedBrowser.CHROME) 313 @SupportedBrowser(SupportedBrowser.CHROME)
314 @SupportedBrowser(SupportedBrowser.SAFARI) 314 @SupportedBrowser(SupportedBrowser.SAFARI)
315 @Experimental() 315 @Experimental()
316 // http://www.w3.org/TR/webdatabase/#sqltransaction 316 // http://www.w3.org/TR/webdatabase/#sqltransaction
317 @deprecated // deprecated 317 @deprecated // deprecated
318 class SqlTransaction extends NativeFieldWrapperClass2 { 318 class SqlTransaction extends NativeFieldWrapperClass2 {
319 // To suppress missing implicit constructor warnings. 319 // To suppress missing implicit constructor warnings.
320 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } 320 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
321 321
322 @DomName('SQLTransaction.executeSql') 322 @DomName('SQLTransaction.executeSql')
323 @DocsEditable() 323 @DocsEditable()
324 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans action.executeSql_Callback_4(this, sqlStatement, arguments, callback, errorCallb ack); 324 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans action.instance.executeSql_Callback_4_(this, sqlStatement, arguments, callback, errorCallback);
325 325
326 } 326 }
327 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 327 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
328 // for details. All rights reserved. Use of this source code is governed by a 328 // for details. All rights reserved. Use of this source code is governed by a
329 // BSD-style license that can be found in the LICENSE file. 329 // BSD-style license that can be found in the LICENSE file.
330 330
331 // WARNING: Do not edit - generated code. 331 // WARNING: Do not edit - generated code.
332 332
333 333
334 @DocsEditable() 334 @DocsEditable()
335 @DomName('SQLTransactionSync') 335 @DomName('SQLTransactionSync')
336 @SupportedBrowser(SupportedBrowser.CHROME) 336 @SupportedBrowser(SupportedBrowser.CHROME)
337 @SupportedBrowser(SupportedBrowser.SAFARI) 337 @SupportedBrowser(SupportedBrowser.SAFARI)
338 @Experimental() 338 @Experimental()
339 // http://www.w3.org/TR/webdatabase/#sqltransactionsync 339 // http://www.w3.org/TR/webdatabase/#sqltransactionsync
340 @Experimental() // deprecated 340 @Experimental() // deprecated
341 abstract class _SQLTransactionSync extends NativeFieldWrapperClass2 { 341 abstract class _SQLTransactionSync extends NativeFieldWrapperClass2 {
342 // To suppress missing implicit constructor warnings. 342 // To suppress missing implicit constructor warnings.
343 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); } 343 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); }
344 344
345 } 345 }
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698