#ifndef StorageEvent_h
#define StorageEvent_h
#include "core/events/Event.h"
#include "heap/Handle.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
class Storage;
struct StorageEventInit : public EventInit {
StorageEventInit();
String key;
String oldValue;
String newValue;
String url;
RefPtrWillBeMember<Storage> storageArea;
};
class StorageEvent FINAL : public Event {
public:
static PassRefPtrWillBeRawPtr<StorageEvent> create();
static PassRefPtrWillBeRawPtr<StorageEvent> create(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea);
static PassRefPtrWillBeRawPtr<StorageEvent> create(const AtomicString&, const StorageEventInit&);
virtual ~StorageEvent();
const String& key() const { return m_key; }
const String& oldValue() const { return m_oldValue; }
const String& newValue() const { return m_newValue; }
const String& url() const { return m_url; }
Storage* storageArea() const { return m_storageArea.get(); }
Storage* storageArea(bool& isNull) const { isNull = !m_storageArea; return m_storageArea.get(); }
void initStorageEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea);
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual void trace(Visitor*) OVERRIDE;
private:
StorageEvent();
StorageEvent(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea);
StorageEvent(const AtomicString&, const StorageEventInit&);
String m_key;
String m_oldValue;
String m_newValue;
String m_url;
RefPtrWillBeMember<Storage> m_storageArea;
};
}
#endif