This source file includes following definitions.
- supplementName
- from
- webkitTemporaryStorage
- webkitPersistentStorage
- webkitTemporaryStorage
- webkitPersistentStorage
- trace
#include "config.h"
#include "modules/quota/WorkerNavigatorStorageQuota.h"
#include "modules/quota/DeprecatedStorageQuota.h"
namespace WebCore {
WorkerNavigatorStorageQuota::WorkerNavigatorStorageQuota()
{
}
const char* WorkerNavigatorStorageQuota::supplementName()
{
return "WorkerNavigatorStorageQuota";
}
WorkerNavigatorStorageQuota& WorkerNavigatorStorageQuota::from(WorkerNavigator& navigator)
{
WorkerNavigatorStorageQuota* supplement = static_cast<WorkerNavigatorStorageQuota*>(WillBeHeapSupplement<WorkerNavigator>::from(navigator, supplementName()));
if (!supplement) {
supplement = new WorkerNavigatorStorageQuota();
provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement));
}
return *supplement;
}
DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitTemporaryStorage(WorkerNavigator& navigator)
{
return WorkerNavigatorStorageQuota::from(navigator).webkitTemporaryStorage();
}
DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitPersistentStorage(WorkerNavigator& navigator)
{
return WorkerNavigatorStorageQuota::from(navigator).webkitPersistentStorage();
}
DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitTemporaryStorage() const
{
if (!m_temporaryStorage)
m_temporaryStorage = DeprecatedStorageQuota::create(DeprecatedStorageQuota::Temporary);
return m_temporaryStorage.get();
}
DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitPersistentStorage() const
{
if (!m_persistentStorage)
m_persistentStorage = DeprecatedStorageQuota::create(DeprecatedStorageQuota::Persistent);
return m_persistentStorage.get();
}
void WorkerNavigatorStorageQuota::trace(Visitor* visitor)
{
visitor->trace(m_temporaryStorage);
visitor->trace(m_persistentStorage);
}
}