diff options
author | Steve Block <steveblock@google.com> | 2010-09-29 17:32:26 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-29 17:35:08 +0100 |
commit | 68513a70bcd92384395513322f1b801e7bf9c729 (patch) | |
tree | 161b50f75a5921d61731bb25e730005994fcec85 /WebCore/storage/IDBCursorBackendImpl.h | |
parent | fd5c6425ce58eb75211be7718d5dee960842a37e (diff) | |
download | external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.zip external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.gz external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.bz2 |
Merge WebKit at r67908: Initial merge by Git
Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
Diffstat (limited to 'WebCore/storage/IDBCursorBackendImpl.h')
-rw-r--r-- | WebCore/storage/IDBCursorBackendImpl.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/WebCore/storage/IDBCursorBackendImpl.h b/WebCore/storage/IDBCursorBackendImpl.h index 3f7c4aa..b67ec70 100644 --- a/WebCore/storage/IDBCursorBackendImpl.h +++ b/WebCore/storage/IDBCursorBackendImpl.h @@ -37,6 +37,8 @@ namespace WebCore { +class IDBDatabaseBackendImpl; +class IDBIndexBackendImpl; class IDBKeyRange; class IDBObjectStoreBackendImpl; class SQLiteStatement; @@ -48,29 +50,42 @@ public: { return adoptRef(new IDBCursorBackendImpl(objectStore, keyRange, direction, query)); } + static PassRefPtr<IDBCursorBackendImpl> create(PassRefPtr<IDBIndexBackendImpl> index, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query, bool isSerializedScriptValueCursor) + { + return adoptRef(new IDBCursorBackendImpl(index, keyRange, direction, query, isSerializedScriptValueCursor)); + } virtual ~IDBCursorBackendImpl(); virtual unsigned short direction() const; virtual PassRefPtr<IDBKey> key() const; - virtual PassRefPtr<SerializedScriptValue> value() const; + virtual PassRefPtr<IDBAny> value() const; virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>); virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>); virtual void remove(PassRefPtr<IDBCallbacks>); private: IDBCursorBackendImpl(PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBKeyRange>, IDBCursor::Direction, PassOwnPtr<SQLiteStatement> query); + IDBCursorBackendImpl(PassRefPtr<IDBIndexBackendImpl>, PassRefPtr<IDBKeyRange>, IDBCursor::Direction, PassOwnPtr<SQLiteStatement> query, bool isSerializedScriptValueCursor); void loadCurrentRow(); + IDBDatabaseBackendImpl* database() const; static const int64_t InvalidId = -1; + // Only one or the other should be used. RefPtr<IDBObjectStoreBackendImpl> m_idbObjectStore; + RefPtr<IDBIndexBackendImpl> m_idbIndex; + RefPtr<IDBKeyRange> m_keyRange; IDBCursor::Direction m_direction; OwnPtr<SQLiteStatement> m_query; + bool m_isSerializedScriptValueCursor; int64_t m_currentId; RefPtr<IDBKey> m_currentKey; - RefPtr<SerializedScriptValue> m_currentValue; + + // Only one of these will ever be used for each instance. Which depends on m_isSerializedScriptValueCursor. + RefPtr<SerializedScriptValue> m_currentSerializedScriptValue; + RefPtr<IDBKey> m_currentIDBKeyValue; }; } // namespace WebCore |