diff options
author | Ben Murdoch <benm@google.com> | 2011-05-24 11:24:40 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-02 09:53:15 +0100 |
commit | 81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch) | |
tree | 7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/storage/IDBRequest.h | |
parent | 94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff) | |
download | external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2 |
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/storage/IDBRequest.h')
-rw-r--r-- | Source/WebCore/storage/IDBRequest.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/Source/WebCore/storage/IDBRequest.h b/Source/WebCore/storage/IDBRequest.h index 5c31318..b6b4e5b 100644 --- a/Source/WebCore/storage/IDBRequest.h +++ b/Source/WebCore/storage/IDBRequest.h @@ -36,12 +36,12 @@ #include "EventListener.h" #include "EventNames.h" #include "EventTarget.h" +#include "ExceptionCode.h" #include "IDBAny.h" #include "IDBCallbacks.h" namespace WebCore { -class IDBEvent; class IDBTransaction; class IDBRequest : public IDBCallbacks, public EventTarget, public ActiveDOMObject { @@ -49,16 +49,28 @@ public: static PassRefPtr<IDBRequest> create(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBTransaction*); virtual ~IDBRequest(); + PassRefPtr<IDBAny> result(ExceptionCode&) const; + unsigned short errorCode(ExceptionCode&) const; + String webkitErrorMessage(ExceptionCode&) const; + PassRefPtr<IDBAny> source() const; + PassRefPtr<IDBTransaction> transaction() const; + // Defined in the IDL enum ReadyState { LOADING = 1, - DONE = 2 + DONE = 2, + EarlyDeath = 3 }; - unsigned short readyState() const { return m_readyState; } + unsigned short readyState() const; + DEFINE_ATTRIBUTE_EVENT_LISTENER(success); DEFINE_ATTRIBUTE_EVENT_LISTENER(error); + void markEarlyDeath(); bool resetReadyState(IDBTransaction*); + void setCursorType(IDBCursorBackendInterface::CursorType); + IDBAny* source(); + void abort(); // IDBCallbacks virtual void onError(PassRefPtr<IDBDatabaseError>); @@ -66,9 +78,9 @@ public: virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>); virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>); virtual void onSuccess(PassRefPtr<IDBKey>); - virtual void onSuccess(PassRefPtr<IDBObjectStoreBackendInterface>); virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>); virtual void onSuccess(PassRefPtr<SerializedScriptValue>); + virtual void onBlocked(); // ActiveDOMObject virtual bool hasPendingActivity() const; @@ -78,15 +90,19 @@ public: virtual ScriptExecutionContext* scriptExecutionContext() const; virtual bool dispatchEvent(PassRefPtr<Event>); bool dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); } + virtual void uncaughtExceptionInEventHandler(); using ThreadSafeShared<IDBCallbacks>::ref; using ThreadSafeShared<IDBCallbacks>::deref; -private: +protected: IDBRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBTransaction*); - void enqueueEvent(PassRefPtr<Event>); + RefPtr<IDBAny> m_result; + unsigned short m_errorCode; + String m_errorMessage; +private: // EventTarget virtual void refEventTarget() { ref(); } virtual void derefEventTarget() { deref(); } @@ -98,6 +114,10 @@ private: ReadyState m_readyState; bool m_finished; // Is it possible that we'll fire any more events? If not, we're finished. + Vector<RefPtr<Event> > m_enqueuedEvents; + + // Only used if the result type will be a cursor. + IDBCursorBackendInterface::CursorType m_cursorType; EventTargetData m_eventTargetData; }; |