This source file includes following definitions.
- create
- onError
- onSuccess
- onSuccess
- onSuccess
- onSuccess
- onSuccess
- onSuccess
- onSuccess
- onSuccess
- onSuccess
- onBlocked
- onUpgradeNeeded
#include "config.h"
#include "modules/indexeddb/WebIDBCallbacksImpl.h"
#include "core/dom/DOMError.h"
#include "modules/indexeddb/IDBMetadata.h"
#include "modules/indexeddb/IDBRequest.h"
#include "platform/SharedBuffer.h"
#include "public/platform/WebData.h"
#include "public/platform/WebIDBCursor.h"
#include "public/platform/WebIDBDatabase.h"
#include "public/platform/WebIDBDatabaseError.h"
#include "public/platform/WebIDBKey.h"
using blink::WebData;
using blink::WebIDBCursor;
using blink::WebIDBDatabase;
using blink::WebIDBDatabaseError;
using blink::WebIDBIndex;
using blink::WebIDBKey;
using blink::WebIDBKeyPath;
using blink::WebIDBMetadata;
namespace WebCore {
PassOwnPtr<WebIDBCallbacksImpl> WebIDBCallbacksImpl::create(PassRefPtr<IDBRequest> request)
{
return adoptPtr(new WebIDBCallbacksImpl(request));
}
WebIDBCallbacksImpl::WebIDBCallbacksImpl(PassRefPtr<IDBRequest> request)
: m_request(request)
{
}
WebIDBCallbacksImpl::~WebIDBCallbacksImpl()
{
}
void WebIDBCallbacksImpl::onError(const WebIDBDatabaseError& error)
{
m_request->onError(error);
}
void WebIDBCallbacksImpl::onSuccess(const blink::WebVector<blink::WebString>& webStringList)
{
Vector<String> stringList;
for (size_t i = 0; i < webStringList.size(); ++i)
stringList.append(webStringList[i]);
m_request->onSuccess(stringList);
}
void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData& value)
{
m_request->onSuccess(adoptPtr(cursor), key, primaryKey, value);
}
void WebIDBCallbacksImpl::onSuccess(WebIDBDatabase* backend, const WebIDBMetadata& metadata)
{
m_request->onSuccess(adoptPtr(backend), metadata);
}
void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key)
{
m_request->onSuccess(key);
}
void WebIDBCallbacksImpl::onSuccess(const WebData& value)
{
m_request->onSuccess(value);
}
void WebIDBCallbacksImpl::onSuccess(const WebData& value, const WebIDBKey& key, const WebIDBKeyPath& keyPath)
{
m_request->onSuccess(value, key, keyPath);
}
void WebIDBCallbacksImpl::onSuccess(long long value)
{
m_request->onSuccess(value);
}
void WebIDBCallbacksImpl::onSuccess()
{
m_request->onSuccess();
}
void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData& value)
{
m_request->onSuccess(key, primaryKey, value);
}
void WebIDBCallbacksImpl::onBlocked(long long oldVersion)
{
m_request->onBlocked(oldVersion);
}
void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata, unsigned short dataLoss, blink::WebString dataLossMessage)
{
m_request->onUpgradeNeeded(oldVersion, adoptPtr(database), metadata, static_cast<blink::WebIDBDataLoss>(dataLoss), dataLossMessage);
}
}