This source file includes following definitions.
- m_dataLossMessage
- m_dataLoss
- newVersion
- dataLoss
- interfaceName
- trace
#include "config.h"
#include "modules/indexeddb/IDBVersionChangeEvent.h"
#include "bindings/v8/IDBBindingUtilities.h"
namespace WebCore {
IDBVersionChangeEventInit::IDBVersionChangeEventInit()
: oldVersion(0)
{
}
IDBVersionChangeEvent::IDBVersionChangeEvent()
: m_dataLoss(blink::WebIDBDataLossNone)
{
ScriptWrappable::init(this);
}
IDBVersionChangeEvent::IDBVersionChangeEvent(const AtomicString& eventType, unsigned long long oldVersion, const Nullable<unsigned long long>& newVersion, blink::WebIDBDataLoss dataLoss, const String& dataLossMessage)
: Event(eventType, false , false )
, m_oldVersion(oldVersion)
, m_newVersion(newVersion)
, m_dataLoss(dataLoss)
, m_dataLossMessage(dataLossMessage)
{
ScriptWrappable::init(this);
}
IDBVersionChangeEvent::IDBVersionChangeEvent(const AtomicString& eventType, const IDBVersionChangeEventInit& initializer)
: Event(eventType, false , false )
, m_oldVersion(initializer.oldVersion)
, m_newVersion(initializer.newVersion)
, m_dataLoss(blink::WebIDBDataLossNone)
{
ScriptWrappable::init(this);
}
unsigned long long IDBVersionChangeEvent::newVersion(bool& isNull) const
{
isNull = m_newVersion.isNull();
return isNull ? 0 : m_newVersion.get();
}
const AtomicString& IDBVersionChangeEvent::dataLoss() const
{
DEFINE_STATIC_LOCAL(AtomicString, total, ("total", AtomicString::ConstructFromLiteral));
if (m_dataLoss == blink::WebIDBDataLossTotal)
return total;
DEFINE_STATIC_LOCAL(AtomicString, none, ("none", AtomicString::ConstructFromLiteral));
return none;
}
const AtomicString& IDBVersionChangeEvent::interfaceName() const
{
return EventNames::IDBVersionChangeEvent;
}
void IDBVersionChangeEvent::trace(Visitor* visitor)
{
Event::trace(visitor);
}
}