#ifndef WebIDBCallbacksImpl_h
#define WebIDBCallbacksImpl_h
#include "public/platform/WebIDBCallbacks.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
namespace blink {
class WebData;
class WebIDBCursor;
class WebIDBDatabase;
class WebIDBDatabaseError;
class WebIDBIndex;
class WebIDBKey;
class WebIDBKeyPath;
struct WebIDBMetadata;
}
namespace WebCore {
class IDBRequest;
class WebIDBCallbacksImpl FINAL : public blink::WebIDBCallbacks {
public:
static PassOwnPtr<WebIDBCallbacksImpl> create(PassRefPtr<IDBRequest>);
virtual ~WebIDBCallbacksImpl();
virtual void onError(const blink::WebIDBDatabaseError&) OVERRIDE;
virtual void onSuccess(const blink::WebVector<blink::WebString>&) OVERRIDE;
virtual void onSuccess(blink::WebIDBCursor*, const blink::WebIDBKey&, const blink::WebIDBKey& primaryKey, const blink::WebData&) OVERRIDE;
virtual void onSuccess(blink::WebIDBDatabase*, const blink::WebIDBMetadata&) OVERRIDE;
virtual void onSuccess(const blink::WebIDBKey&) OVERRIDE;
virtual void onSuccess(const blink::WebData&) OVERRIDE;
virtual void onSuccess(const blink::WebData&, const blink::WebIDBKey&, const blink::WebIDBKeyPath&) OVERRIDE;
virtual void onSuccess(long long) OVERRIDE;
virtual void onSuccess() OVERRIDE;
virtual void onSuccess(const blink::WebIDBKey&, const blink::WebIDBKey& primaryKey, const blink::WebData&) OVERRIDE;
virtual void onBlocked(long long oldVersion) OVERRIDE;
virtual void onUpgradeNeeded(long long oldVersion, blink::WebIDBDatabase*, const blink::WebIDBMetadata&, unsigned short dataLoss, blink::WebString dataLossMessage) OVERRIDE;
private:
explicit WebIDBCallbacksImpl(PassRefPtr<IDBRequest>);
RefPtr<IDBRequest> m_request;
};
}
#endif