OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "modules/indexeddb/IDBHistograms.h" | 38 #include "modules/indexeddb/IDBHistograms.h" |
39 #include "modules/indexeddb/IDBMetadata.h" | 39 #include "modules/indexeddb/IDBMetadata.h" |
40 #include "modules/indexeddb/IDBObjectStore.h" | 40 #include "modules/indexeddb/IDBObjectStore.h" |
41 #include "modules/indexeddb/IDBObjectStoreParameters.h" | 41 #include "modules/indexeddb/IDBObjectStoreParameters.h" |
42 #include "modules/indexeddb/IDBTransaction.h" | 42 #include "modules/indexeddb/IDBTransaction.h" |
43 #include "modules/indexeddb/IndexedDB.h" | 43 #include "modules/indexeddb/IndexedDB.h" |
44 #include "platform/heap/Handle.h" | 44 #include "platform/heap/Handle.h" |
45 #include "public/platform/modules/indexeddb/WebIDBDatabase.h" | 45 #include "public/platform/modules/indexeddb/WebIDBDatabase.h" |
46 #include "wtf/PassRefPtr.h" | 46 #include "wtf/PassRefPtr.h" |
47 #include "wtf/RefPtr.h" | 47 #include "wtf/RefPtr.h" |
| 48 |
48 #include <memory> | 49 #include <memory> |
49 | 50 |
50 namespace blink { | 51 namespace blink { |
51 | 52 |
52 class DOMException; | 53 class DOMException; |
53 class ExceptionState; | 54 class ExceptionState; |
54 class ExecutionContext; | 55 class ExecutionContext; |
55 class IDBObserver; | 56 class IDBObserver; |
56 struct WebIDBObservation; | 57 struct WebIDBObservation; |
57 | 58 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 110 |
110 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); | 111 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); |
111 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); | 112 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); |
112 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 113 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
113 DEFINE_ATTRIBUTE_EVENT_LISTENER(versionchange); | 114 DEFINE_ATTRIBUTE_EVENT_LISTENER(versionchange); |
114 | 115 |
115 // IDBDatabaseCallbacks | 116 // IDBDatabaseCallbacks |
116 void onVersionChange(int64_t oldVersion, int64_t newVersion); | 117 void onVersionChange(int64_t oldVersion, int64_t newVersion); |
117 void onAbort(int64_t, DOMException*); | 118 void onAbort(int64_t, DOMException*); |
118 void onComplete(int64_t); | 119 void onComplete(int64_t); |
119 void onChanges(const std::unordered_map<int32_t, std::vector<int32_t>>& | 120 void onChanges( |
120 observation_index_map, | 121 const std::unordered_map<int32_t, std::vector<int32_t>>& |
121 const WebVector<WebIDBObservation>& observations); | 122 observation_index_map, |
| 123 const WebVector<WebIDBObservation>& observations, |
| 124 const std::unordered_map<int32_t, |
| 125 std::pair<int64_t, std::vector<int64_t>>>& |
| 126 transactions); |
122 | 127 |
123 // ScriptWrappable | 128 // ScriptWrappable |
124 bool hasPendingActivity() const final; | 129 bool hasPendingActivity() const final; |
125 | 130 |
126 // ContextLifecycleObserver | 131 // ContextLifecycleObserver |
127 void contextDestroyed() override; | 132 void contextDestroyed() override; |
128 | 133 |
129 // EventTarget | 134 // EventTarget |
130 const AtomicString& interfaceName() const override; | 135 const AtomicString& interfaceName() const override; |
131 ExecutionContext* getExecutionContext() const override; | 136 ExecutionContext* getExecutionContext() const override; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 // Keep track of the versionchange events waiting to be fired on this | 200 // Keep track of the versionchange events waiting to be fired on this |
196 // database so that we can cancel them if the database closes. | 201 // database so that we can cancel them if the database closes. |
197 HeapVector<Member<Event>> m_enqueuedEvents; | 202 HeapVector<Member<Event>> m_enqueuedEvents; |
198 | 203 |
199 Member<IDBDatabaseCallbacks> m_databaseCallbacks; | 204 Member<IDBDatabaseCallbacks> m_databaseCallbacks; |
200 }; | 205 }; |
201 | 206 |
202 } // namespace blink | 207 } // namespace blink |
203 | 208 |
204 #endif // IDBDatabase_h | 209 #endif // IDBDatabase_h |
OLD | NEW |