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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 static const char sourceDeletedErrorMessage[]; | 127 static const char sourceDeletedErrorMessage[]; |
128 static const char transactionFinishedErrorMessage[]; | 128 static const char transactionFinishedErrorMessage[]; |
129 static const char transactionInactiveErrorMessage[]; | 129 static const char transactionInactiveErrorMessage[]; |
130 static const char transactionReadOnlyErrorMessage[]; | 130 static const char transactionReadOnlyErrorMessage[]; |
131 static const char databaseClosedErrorMessage[]; | 131 static const char databaseClosedErrorMessage[]; |
132 | 132 |
133 static void recordApiCallsHistogram(IndexedDatabaseMethods); | 133 static void recordApiCallsHistogram(IndexedDatabaseMethods); |
134 | 134 |
135 protected: | 135 protected: |
136 // EventTarget | 136 // EventTarget |
137 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) override; | 137 DispatchEventResult dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) ove
rride; |
138 | 138 |
139 private: | 139 private: |
140 IDBDatabase(ExecutionContext*, PassOwnPtr<WebIDBDatabase>, IDBDatabaseCallba
cks*); | 140 IDBDatabase(ExecutionContext*, PassOwnPtr<WebIDBDatabase>, IDBDatabaseCallba
cks*); |
141 | 141 |
142 IDBObjectStore* createObjectStore(const String& name, const IDBKeyPath&, boo
l autoIncrement, ExceptionState&); | 142 IDBObjectStore* createObjectStore(const String& name, const IDBKeyPath&, boo
l autoIncrement, ExceptionState&); |
143 void closeConnection(); | 143 void closeConnection(); |
144 | 144 |
145 IDBDatabaseMetadata m_metadata; | 145 IDBDatabaseMetadata m_metadata; |
146 OwnPtr<WebIDBDatabase> m_backend; | 146 OwnPtr<WebIDBDatabase> m_backend; |
147 Member<IDBTransaction> m_versionChangeTransaction; | 147 Member<IDBTransaction> m_versionChangeTransaction; |
148 HeapHashMap<int64_t, Member<IDBTransaction>> m_transactions; | 148 HeapHashMap<int64_t, Member<IDBTransaction>> m_transactions; |
149 | 149 |
150 bool m_closePending = false; | 150 bool m_closePending = false; |
151 bool m_contextStopped = false; | 151 bool m_contextStopped = false; |
152 | 152 |
153 // Keep track of the versionchange events waiting to be fired on this | 153 // Keep track of the versionchange events waiting to be fired on this |
154 // database so that we can cancel them if the database closes. | 154 // database so that we can cancel them if the database closes. |
155 WillBeHeapVector<RefPtrWillBeMember<Event>> m_enqueuedEvents; | 155 WillBeHeapVector<RefPtrWillBeMember<Event>> m_enqueuedEvents; |
156 | 156 |
157 Member<IDBDatabaseCallbacks> m_databaseCallbacks; | 157 Member<IDBDatabaseCallbacks> m_databaseCallbacks; |
158 }; | 158 }; |
159 | 159 |
160 } // namespace blink | 160 } // namespace blink |
161 | 161 |
162 #endif // IDBDatabase_h | 162 #endif // IDBDatabase_h |
OLD | NEW |