This source file includes following definitions.
- supplementName
- from
- indexedDB
- indexedDB
- trace
#include "config.h"
#include "modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h"
#include "core/dom/ExecutionContext.h"
#include "modules/indexeddb/IDBFactory.h"
#include "modules/indexeddb/IDBFactoryBackendInterface.h"
namespace WebCore {
WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase()
{
}
WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase()
{
}
const char* WorkerGlobalScopeIndexedDatabase::supplementName()
{
return "WorkerGlobalScopeIndexedDatabase";
}
WorkerGlobalScopeIndexedDatabase& WorkerGlobalScopeIndexedDatabase::from(WillBeHeapSupplementable<WorkerGlobalScope>& context)
{
WorkerGlobalScopeIndexedDatabase* supplement = static_cast<WorkerGlobalScopeIndexedDatabase*>(WillBeHeapSupplement<WorkerGlobalScope>::from(context, supplementName()));
if (!supplement) {
supplement = new WorkerGlobalScopeIndexedDatabase();
provideTo(context, supplementName(), adoptPtrWillBeNoop(supplement));
}
return *supplement;
}
IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB(WillBeHeapSupplementable<WorkerGlobalScope>& context)
{
return from(context).indexedDB();
}
IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB()
{
if (!m_factoryBackend)
m_factoryBackend = IDBFactoryBackendInterface::create();
if (!m_idbFactory)
m_idbFactory = IDBFactory::create(m_factoryBackend.get());
return m_idbFactory.get();
}
void WorkerGlobalScopeIndexedDatabase::trace(Visitor*)
{
}
}