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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/interfaces.idl

Issue 2478613003: Revert of Import wpt@a99ba661fff2fb129894bdff21d63814d9b3f7e9 (Closed)
Patch Set: Created 4 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
OLDNEW
1 enum IDBTransactionMode { 1 enum IDBTransactionMode {
2 "readonly", 2 "readonly",
3 "readwrite", 3 "readwrite",
4 "versionchange" 4 "versionchange"
5 }; 5 };
6 6
7 enum IDBRequestReadyState { 7 enum IDBRequestReadyState {
8 "pending", 8 "pending",
9 "done" 9 "done"
10 }; 10 };
11 11
12 [Exposed=(Window,Worker)]
13 interface IDBKeyRange { 12 interface IDBKeyRange {
14 readonly attribute any lower; 13 readonly attribute any lower;
15 readonly attribute any upper; 14 readonly attribute any upper;
16 readonly attribute boolean lowerOpen; 15 readonly attribute boolean lowerOpen;
17 readonly attribute boolean upperOpen; 16 readonly attribute boolean upperOpen;
18 static IDBKeyRange only (any value); 17 static IDBKeyRange only (any value);
19 static IDBKeyRange lowerBound (any lower, optional boolean open = false); 18 static IDBKeyRange lowerBound (any lower, optional boolean open = false);
20 static IDBKeyRange upperBound (any upper, optional boolean open = false); 19 static IDBKeyRange upperBound (any upper, optional boolean open = false);
21 static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false); 20 static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
22 }; 21 };
(...skipping 13 matching lines...) Expand all
36 dictionary IDBIndexParameters { 35 dictionary IDBIndexParameters {
37 boolean unique = false; 36 boolean unique = false;
38 boolean multiEntry = false; 37 boolean multiEntry = false;
39 }; 38 };
40 39
41 dictionary IDBVersionChangeEventInit : EventInit { 40 dictionary IDBVersionChangeEventInit : EventInit {
42 unsigned long long oldVersion = 0; 41 unsigned long long oldVersion = 0;
43 unsigned long long? newVersion = null; 42 unsigned long long? newVersion = null;
44 }; 43 };
45 44
46 [Exposed=(Window,Worker)]
47 interface IDBRequest : EventTarget { 45 interface IDBRequest : EventTarget {
48 readonly attribute any result; 46 readonly attribute any result;
49 readonly attribute DOMError error; 47 readonly attribute DOMError error;
50 readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source; 48 readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source;
51 readonly attribute IDBTransaction transaction ; 49 readonly attribute IDBTransaction transaction ;
52 readonly attribute IDBRequestReadyState readyState; 50 readonly attribute IDBRequestReadyState readyState;
53 attribute EventHandler onsuccess; 51 attribute EventHandler onsuccess;
54 attribute EventHandler onerror; 52 attribute EventHandler onerror;
55 }; 53 };
56 54
57 [Exposed=(Window,Worker)]
58 interface IDBOpenDBRequest : IDBRequest { 55 interface IDBOpenDBRequest : IDBRequest {
59 attribute EventHandler onblocked; 56 attribute EventHandler onblocked;
60 attribute EventHandler onupgradeneeded; 57 attribute EventHandler onupgradeneeded;
61 }; 58 };
62 59
63 [Exposed=(Window,Worker), 60 [Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict)]
64 Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict)]
65 interface IDBVersionChangeEvent : Event { 61 interface IDBVersionChangeEvent : Event {
66 readonly attribute unsigned long long oldVersion; 62 readonly attribute unsigned long long oldVersion;
67 readonly attribute unsigned long long? newVersion; 63 readonly attribute unsigned long long? newVersion;
68 }; 64 };
69 65
70 [NoInterfaceObject] 66 [NoInterfaceObject]
71 interface IDBEnvironment { 67 interface IDBEnvironment {
72 readonly attribute IDBFactory indexedDB; 68 readonly attribute IDBFactory indexedDB;
73 }; 69 };
74 70
75 [Exposed=(Window,Worker)]
76 interface IDBFactory { 71 interface IDBFactory {
77 IDBOpenDBRequest open (DOMString name, [EnforceRange] optional unsigned long long version); 72 IDBOpenDBRequest open (DOMString name, [EnforceRange] optional unsigned long long version);
78 IDBOpenDBRequest deleteDatabase (DOMString name); 73 IDBOpenDBRequest deleteDatabase (DOMString name);
79 short cmp (any first, any second); 74 short cmp (any first, any second);
80 }; 75 };
81 76
82 [Exposed=(Window,Worker)]
83 interface IDBDatabase : EventTarget { 77 interface IDBDatabase : EventTarget {
84 readonly attribute DOMString name; 78 readonly attribute DOMString name;
85 readonly attribute unsigned long long version; 79 readonly attribute unsigned long long version;
86 readonly attribute DOMStringList objectStoreNames; 80 readonly attribute DOMStringList objectStoreNames;
87 IDBObjectStore createObjectStore (DOMString name, optional IDBObjectStorePar ameters optionalParameters); 81 IDBObjectStore createObjectStore (DOMString name, optional IDBObjectStorePar ameters optionalParameters);
88 void deleteObjectStore (DOMString name); 82 void deleteObjectStore (DOMString name);
89 IDBTransaction transaction ((DOMString or sequence<DOMString>) storeNames, o ptional IDBTransactionMode mode = "readonly"); 83 IDBTransaction transaction ((DOMString or sequence<DOMString>) storeNames, o ptional IDBTransactionMode mode = "readonly");
90 void close (); 84 void close ();
91 attribute EventHandler onabort; 85 attribute EventHandler onabort;
92 attribute EventHandler onclose; 86 attribute EventHandler onclose;
93 attribute EventHandler onerror; 87 attribute EventHandler onerror;
94 attribute EventHandler onversionchange; 88 attribute EventHandler onversionchange;
95 }; 89 };
96 90
97 [Exposed=(Window,Worker)]
98 interface IDBObjectStore { 91 interface IDBObjectStore {
99 attribute DOMString name; 92 attribute DOMString name;
100 readonly attribute any keyPath; 93 readonly attribute any keyPath;
101 readonly attribute DOMStringList indexNames; 94 readonly attribute DOMStringList indexNames;
102 readonly attribute IDBTransaction transaction; 95 readonly attribute IDBTransaction transaction;
103 readonly attribute boolean autoIncrement; 96 readonly attribute boolean autoIncrement;
104 IDBRequest put (any value, optional any key); 97 IDBRequest put (any value, optional any key);
105 IDBRequest add (any value, optional any key); 98 IDBRequest add (any value, optional any key);
106 IDBRequest delete (any key); 99 IDBRequest delete (any key);
107 IDBRequest get (any key); 100 IDBRequest get (any key);
108 IDBRequest clear (); 101 IDBRequest clear ();
109 IDBRequest openCursor (optional any range, optional IDBCursorDirection direc tion = "next"); 102 IDBRequest openCursor (optional any range, optional IDBCursorDirection direc tion = "next");
110 IDBIndex createIndex (DOMString name, (DOMString or sequence<DOMString>) k eyPath, optional IDBIndexParameters optionalParameters); 103 IDBIndex createIndex (DOMString name, (DOMString or sequence<DOMString>) k eyPath, optional IDBIndexParameters optionalParameters);
111 IDBIndex index (DOMString name); 104 IDBIndex index (DOMString name);
112 void deleteIndex (DOMString indexName); 105 void deleteIndex (DOMString indexName);
113 IDBRequest count (optional any key); 106 IDBRequest count (optional any key);
114 }; 107 };
115 108
116 [Exposed=(Window,Worker)]
117 interface IDBIndex { 109 interface IDBIndex {
118 attribute DOMString name; 110 attribute DOMString name;
119 readonly attribute IDBObjectStore objectStore; 111 readonly attribute IDBObjectStore objectStore;
120 readonly attribute any keyPath; 112 readonly attribute any keyPath;
121 readonly attribute boolean multiEntry; 113 readonly attribute boolean multiEntry;
122 readonly attribute boolean unique; 114 readonly attribute boolean unique;
123 IDBRequest openCursor (optional any range, optional IDBCursorDirection direc tion = "next"); 115 IDBRequest openCursor (optional any range, optional IDBCursorDirection direc tion = "next");
124 IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection di rection = "next"); 116 IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection di rection = "next");
125 IDBRequest get (any key); 117 IDBRequest get (any key);
126 IDBRequest getKey (any key); 118 IDBRequest getKey (any key);
127 IDBRequest count (optional any key); 119 IDBRequest count (optional any key);
128 }; 120 };
129 121
130 [Exposed=(Window,Worker)]
131 interface IDBCursor { 122 interface IDBCursor {
132 readonly attribute (IDBObjectStore or IDBIndex) source; 123 readonly attribute (IDBObjectStore or IDBIndex) source;
133 readonly attribute IDBCursorDirection direction; 124 readonly attribute IDBCursorDirection direction;
134 readonly attribute any key; 125 readonly attribute any key;
135 readonly attribute any primaryKey; 126 readonly attribute any primaryKey;
136 IDBRequest update (any value); 127 IDBRequest update (any value);
137 void advance ([EnforceRange] unsigned long count); 128 void advance ([EnforceRange] unsigned long count);
138 void continue (optional any key); 129 void continue (optional any key);
139 IDBRequest delete (); 130 IDBRequest delete ();
140 }; 131 };
141 132
142 [Exposed=(Window,Worker)]
143 interface IDBCursorWithValue : IDBCursor { 133 interface IDBCursorWithValue : IDBCursor {
144 readonly attribute any value; 134 readonly attribute any value;
145 }; 135 };
146 136
147 [Exposed=(Window,Worker)]
148 interface IDBTransaction : EventTarget { 137 interface IDBTransaction : EventTarget {
149 readonly attribute IDBTransactionMode mode; 138 readonly attribute IDBTransactionMode mode;
150 readonly attribute IDBDatabase db; 139 readonly attribute IDBDatabase db;
151 readonly attribute DOMError error; 140 readonly attribute DOMError error;
152 IDBObjectStore objectStore (DOMString name); 141 IDBObjectStore objectStore (DOMString name);
153 void abort (); 142 void abort ();
154 attribute EventHandler onabort; 143 attribute EventHandler onabort;
155 attribute EventHandler oncomplete; 144 attribute EventHandler oncomplete;
156 attribute EventHandler onerror; 145 attribute EventHandler onerror;
157 }; 146 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698