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

Unified Diff: tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate

Issue 12313015: Dartifying remainder of Index DB APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
diff --git a/tools/dom/templates/html/dart2js/impl_IDBDatabase.darttemplate b/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
similarity index 64%
rename from tools/dom/templates/html/dart2js/impl_IDBDatabase.darttemplate
rename to tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
index cc7154d66db691eaa1b6b5bf5f12d25ccee7b19c..fc77a04e9415a53deae83680e8e9ee18e1084e11 100644
--- a/tools/dom/templates/html/dart2js/impl_IDBDatabase.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
@@ -1,11 +1,27 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, 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.
part of $LIBRARYNAME;
+@DocsEditable
$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ @DomName('IDBDatabase.createObjectStore')
+ @DocsEditable
+ ObjectStore createObjectStore(String name,
+ {String keyPath, bool autoIncrement}) {
+ var options = {};
+ if (keyPath != null) {
+ options['keyPath'] = keyPath;
+ }
+ if (autoIncrement != null) {
+ options['autoIncrement'] = autoIncrement;
+ }
+
+ return $dom_createObjectStore(name, options);
+ }
+$if DART2JS
Transaction transaction(storeName_OR_storeNames, String mode) {
if (mode != 'readonly' && mode != 'readwrite') {
throw new ArgumentError(mode);
@@ -22,5 +38,6 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
@JSName('transaction')
Transaction _transaction(stores, mode) native;
+$endif
$!MEMBERS}
« no previous file with comments | « tools/dom/templates/html/impl/impl_IDBCursor.darttemplate ('k') | tools/dom/templates/html/impl/impl_IDBFactory.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698