| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/dom/DOMStringList.h" | 37 #include "core/dom/DOMStringList.h" |
| 38 #include "core/events/EventListener.h" | 38 #include "core/events/EventListener.h" |
| 39 #include "core/events/EventTarget.h" | 39 #include "core/events/EventTarget.h" |
| 40 #include "modules/EventModules.h" | 40 #include "modules/EventModules.h" |
| 41 #include "modules/indexeddb/IDBAny.h" | 41 #include "modules/indexeddb/IDBAny.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/WebBlobInfo.h" | 45 #include "public/platform/WebBlobInfo.h" |
| 46 #include "public/platform/WebIDBCursor.h" | 46 #include "public/platform/WebIDBCursor.h" |
| 47 #include "public/platform/WebIDBTypes.h" |
| 47 | 48 |
| 48 namespace WebCore { | 49 namespace WebCore { |
| 49 | 50 |
| 50 class ExceptionState; | 51 class ExceptionState; |
| 51 class IDBCursor; | 52 class IDBCursor; |
| 52 struct IDBDatabaseMetadata; | 53 struct IDBDatabaseMetadata; |
| 53 class SharedBuffer; | 54 class SharedBuffer; |
| 54 | 55 |
| 55 class IDBRequest | 56 class IDBRequest |
| 56 : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<IDBReques
t> | 57 : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<IDBReques
t> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 81 PENDING = 1, | 82 PENDING = 1, |
| 82 DONE = 2, | 83 DONE = 2, |
| 83 EarlyDeath = 3 | 84 EarlyDeath = 3 |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 const String& readyState() const; | 87 const String& readyState() const; |
| 87 | 88 |
| 88 DEFINE_ATTRIBUTE_EVENT_LISTENER(success); | 89 DEFINE_ATTRIBUTE_EVENT_LISTENER(success); |
| 89 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 90 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
| 90 | 91 |
| 91 void setCursorDetails(IndexedDB::CursorType, blink::WebIDBCursor::Direction)
; | 92 void setCursorDetails(IndexedDB::CursorType, blink::WebIDBCursorDirection); |
| 92 void setPendingCursor(IDBCursor*); | 93 void setPendingCursor(IDBCursor*); |
| 93 void abort(); | 94 void abort(); |
| 94 | 95 |
| 95 virtual void onError(PassRefPtrWillBeRawPtr<DOMError>); | 96 virtual void onError(PassRefPtrWillBeRawPtr<DOMError>); |
| 96 virtual void onSuccess(const Vector<String>&); | 97 virtual void onSuccess(const Vector<String>&); |
| 97 virtual void onSuccess(PassOwnPtr<blink::WebIDBCursor>, IDBKey*, IDBKey* pri
maryKey, PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::WebBlobInfo> >); | 98 virtual void onSuccess(PassOwnPtr<blink::WebIDBCursor>, IDBKey*, IDBKey* pri
maryKey, PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::WebBlobInfo> >); |
| 98 virtual void onSuccess(IDBKey*); | 99 virtual void onSuccess(IDBKey*); |
| 99 virtual void onSuccess(PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::We
bBlobInfo> >); | 100 virtual void onSuccess(PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::We
bBlobInfo> >); |
| 100 virtual void onSuccess(PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::We
bBlobInfo> >, IDBKey*, const IDBKeyPath&); | 101 virtual void onSuccess(PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::We
bBlobInfo> >, IDBKey*, const IDBKeyPath&); |
| 101 virtual void onSuccess(int64_t); | 102 virtual void onSuccess(int64_t); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 RefPtr<ScriptState> m_scriptState; | 147 RefPtr<ScriptState> m_scriptState; |
| 147 Member<IDBAny> m_source; | 148 Member<IDBAny> m_source; |
| 148 Member<IDBAny> m_result; | 149 Member<IDBAny> m_result; |
| 149 RefPtrWillBeMember<DOMError> m_error; | 150 RefPtrWillBeMember<DOMError> m_error; |
| 150 | 151 |
| 151 bool m_hasPendingActivity; | 152 bool m_hasPendingActivity; |
| 152 WillBeHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; | 153 WillBeHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; |
| 153 | 154 |
| 154 // Only used if the result type will be a cursor. | 155 // Only used if the result type will be a cursor. |
| 155 IndexedDB::CursorType m_cursorType; | 156 IndexedDB::CursorType m_cursorType; |
| 156 blink::WebIDBCursor::Direction m_cursorDirection; | 157 blink::WebIDBCursorDirection m_cursorDirection; |
| 157 // When a cursor is continued/advanced, m_result is cleared and m_pendingCur
sor holds it. | 158 // When a cursor is continued/advanced, m_result is cleared and m_pendingCur
sor holds it. |
| 158 Member<IDBCursor> m_pendingCursor; | 159 Member<IDBCursor> m_pendingCursor; |
| 159 // New state is not applied to the cursor object until the event is dispatch
ed. | 160 // New state is not applied to the cursor object until the event is dispatch
ed. |
| 160 Member<IDBKey> m_cursorKey; | 161 Member<IDBKey> m_cursorKey; |
| 161 Member<IDBKey> m_cursorPrimaryKey; | 162 Member<IDBKey> m_cursorPrimaryKey; |
| 162 RefPtr<SharedBuffer> m_cursorValue; | 163 RefPtr<SharedBuffer> m_cursorValue; |
| 163 OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo; | 164 OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo; |
| 164 | 165 |
| 165 bool m_didFireUpgradeNeededEvent; | 166 bool m_didFireUpgradeNeededEvent; |
| 166 bool m_preventPropagation; | 167 bool m_preventPropagation; |
| 167 bool m_resultDirty; | 168 bool m_resultDirty; |
| 168 }; | 169 }; |
| 169 | 170 |
| 170 } // namespace WebCore | 171 } // namespace WebCore |
| 171 | 172 |
| 172 #endif // IDBRequest_h | 173 #endif // IDBRequest_h |
| OLD | NEW |