#ifndef AutocompleteErrorEvent_h
#define AutocompleteErrorEvent_h
#include "core/events/Event.h"
namespace WebCore {
struct AutocompleteErrorEventInit : public EventInit {
String reason;
};
class AutocompleteErrorEvent FINAL : public Event {
public:
static PassRefPtrWillBeRawPtr<AutocompleteErrorEvent> create()
{
return adoptRefWillBeNoop(new AutocompleteErrorEvent);
}
static PassRefPtrWillBeRawPtr<AutocompleteErrorEvent> create(const String& reason)
{
return adoptRefWillBeNoop(new AutocompleteErrorEvent(reason));
}
static PassRefPtrWillBeRawPtr<AutocompleteErrorEvent> create(const AtomicString& eventType, const AutocompleteErrorEventInit& initializer)
{
return adoptRefWillBeNoop(new AutocompleteErrorEvent(eventType, initializer));
}
const String& reason() const { return m_reason; }
virtual const AtomicString& interfaceName() const OVERRIDE { return EventNames::AutocompleteErrorEvent; }
virtual void trace(Visitor* visitor) OVERRIDE { Event::trace(visitor); }
private:
AutocompleteErrorEvent()
{
ScriptWrappable::init(this);
}
AutocompleteErrorEvent(const String& reason)
: Event(EventTypeNames::autocompleteerror, true, false)
, m_reason(reason)
{
ScriptWrappable::init(this);
}
AutocompleteErrorEvent(const AtomicString& eventType, const AutocompleteErrorEventInit& initializer)
: Event(eventType, initializer)
, m_reason(initializer.reason)
{
ScriptWrappable::init(this);
}
String m_reason;
};
}
#endif