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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 DECLARE_VIRTUAL_TRACE(); | 65 DECLARE_VIRTUAL_TRACE(); |
66 | 66 |
67 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } | 67 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } |
68 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); | 68 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); |
69 void indexDeleted(int64_t objectStoreId, int64_t indexId); | 69 void indexDeleted(int64_t objectStoreId, int64_t indexId); |
70 void transactionCreated(IDBTransaction*); | 70 void transactionCreated(IDBTransaction*); |
71 void transactionFinished(const IDBTransaction*); | 71 void transactionFinished(const IDBTransaction*); |
72 | 72 |
73 // Implement the IDL | 73 // Implement the IDL |
74 const String& name() const { return m_metadata.name; } | 74 const String& name() const { return m_metadata.name; } |
75 unsigned long long version() const { return m_metadata.intVersion; } | 75 unsigned long long version() const { return m_metadata.version; } |
76 PassRefPtrWillBeRawPtr<DOMStringList> objectStoreNames() const; | 76 PassRefPtrWillBeRawPtr<DOMStringList> objectStoreNames() const; |
77 | 77 |
78 IDBObjectStore* createObjectStore(const String& name, const IDBObjectStorePa
rameters& options, ExceptionState& exceptionState) { return createObjectStore(na
me, IDBKeyPath(options.keyPath()), options.autoIncrement(), exceptionState); } | 78 IDBObjectStore* createObjectStore(const String& name, const IDBObjectStorePa
rameters& options, ExceptionState& exceptionState) { return createObjectStore(na
me, IDBKeyPath(options.keyPath()), options.autoIncrement(), exceptionState); } |
79 IDBTransaction* transaction(ScriptState*, const StringOrStringSequenceOrDOMS
tringList&, const String& mode, ExceptionState&); | 79 IDBTransaction* transaction(ScriptState*, const StringOrStringSequenceOrDOMS
tringList&, const String& mode, ExceptionState&); |
80 void deleteObjectStore(const String& name, ExceptionState&); | 80 void deleteObjectStore(const String& name, ExceptionState&); |
81 void close(); | 81 void close(); |
82 | 82 |
83 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); | 83 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); |
84 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); | 84 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); |
85 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 85 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |