This source file includes following definitions.
- name
- displayName
- estimatedSize
- securityOrigin
- isSyncDatabase
- updateDatabaseSize
- updateSpaceAvailable
- resetSpaceAvailable
- closeDatabaseImmediately
#include "config.h"
#include "WebDatabase.h"
#include "public/platform/WebString.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "modules/webdatabase/DatabaseBackendBase.h"
#include "modules/webdatabase/DatabaseManager.h"
#include "modules/webdatabase/QuotaTracker.h"
#include "platform/weborigin/SecurityOrigin.h"
using namespace WebCore;
namespace blink {
WebString WebDatabase::name() const
{
ASSERT(m_database);
return m_database->stringIdentifier();
}
WebString WebDatabase::displayName() const
{
ASSERT(m_database);
return m_database->displayName();
}
unsigned long WebDatabase::estimatedSize() const
{
ASSERT(m_database);
return m_database->estimatedSize();
}
WebSecurityOrigin WebDatabase::securityOrigin() const
{
ASSERT(m_database);
return WebSecurityOrigin(m_database->securityOrigin());
}
bool WebDatabase::isSyncDatabase() const
{
ASSERT(m_database);
return m_database->isSyncDatabase();
}
void WebDatabase::updateDatabaseSize(const WebString& originIdentifier, const WebString& name, long long size)
{
QuotaTracker::instance().updateDatabaseSize(originIdentifier, name, size);
}
void WebDatabase::updateSpaceAvailable(const WebString& originIdentifier, long long spaceAvailable)
{
QuotaTracker::instance().updateSpaceAvailableToOrigin(originIdentifier, spaceAvailable);
}
void WebDatabase::resetSpaceAvailable(const WebString& originIdentifier)
{
QuotaTracker::instance().resetSpaceAvailableToOrigin(originIdentifier);
}
void WebDatabase::closeDatabaseImmediately(const WebString& originIdentifier, const WebString& databaseName)
{
DatabaseManager::manager().closeDatabasesImmediately(originIdentifier, databaseName);
}
WebDatabase::WebDatabase(const DatabaseBackendBase* database)
: m_database(database)
{
}
}