#ifndef DeprecatedStorageQuotaCallbacksImpl_h
#define DeprecatedStorageQuotaCallbacksImpl_h
#include "modules/quota/StorageErrorCallback.h"
#include "modules/quota/StorageQuotaCallback.h"
#include "modules/quota/StorageUsageCallback.h"
#include "platform/StorageQuotaCallbacks.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
namespace WebCore {
class DeprecatedStorageQuotaCallbacksImpl FINAL : public StorageQuotaCallbacks {
public:
static PassOwnPtr<DeprecatedStorageQuotaCallbacksImpl> create(PassOwnPtr<StorageUsageCallback> success, PassOwnPtr<StorageErrorCallback> error)
{
return adoptPtr(new DeprecatedStorageQuotaCallbacksImpl(success, error));
}
static PassOwnPtr<DeprecatedStorageQuotaCallbacksImpl> create(PassOwnPtr<StorageQuotaCallback> success, PassOwnPtr<StorageErrorCallback> error)
{
return adoptPtr(new DeprecatedStorageQuotaCallbacksImpl(success, error));
}
virtual ~DeprecatedStorageQuotaCallbacksImpl();
virtual void didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes) OVERRIDE;
virtual void didGrantStorageQuota(unsigned long long usageInBytes, unsigned long long grantedQuotaInBytes) OVERRIDE;
virtual void didFail(blink::WebStorageQuotaError) OVERRIDE;
private:
DeprecatedStorageQuotaCallbacksImpl(PassOwnPtr<StorageUsageCallback>, PassOwnPtr<StorageErrorCallback>);
DeprecatedStorageQuotaCallbacksImpl(PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>);
OwnPtr<StorageUsageCallback> m_usageCallback;
OwnPtr<StorageQuotaCallback> m_quotaCallback;
OwnPtr<StorageErrorCallback> m_errorCallback;
};
}
#endif