Chromium Code Reviews| Index: Source/core/xml/XMLHttpRequestEventTarget.h |
| diff --git a/Source/core/page/DOMWindowBase64.h b/Source/core/xml/XMLHttpRequestEventTarget.h |
| similarity index 68% |
| copy from Source/core/page/DOMWindowBase64.h |
| copy to Source/core/xml/XMLHttpRequestEventTarget.h |
| index 21001e0bf625345cded68564b9c97ad3be189722..5c75dc798b674cb7dfce34ab878bd519fce08bac 100644 |
| --- a/Source/core/page/DOMWindowBase64.h |
| +++ b/Source/core/xml/XMLHttpRequestEventTarget.h |
| @@ -1,6 +1,4 @@ |
| /* |
| - * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| @@ -30,20 +28,30 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef DOMWindowBase64_h |
| -#define DOMWindowBase64_h |
| +#ifndef XMLHttpRequestEventTarget_h |
| +#define XMLHttpRequestEventTarget_h |
| -#include "wtf/text/WTFString.h" |
| +#include "core/dom/EventTarget.h" |
| namespace WebCore { |
| -class ExceptionState; |
| +class XMLHttpRequestEventTarget : public EventTarget { |
| +public: |
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); |
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(load); |
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(loadend); |
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(loadstart); |
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(progress); |
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(timeout); |
| -namespace DOMWindowBase64 { |
| -String btoa(void*, const String& stringToEncode, ExceptionState&); |
| -String atob(void*, const String& encodedString, ExceptionState&); |
| -} |
| +protected: |
| + virtual EventTargetData* eventTargetData() OVERRIDE { return &m_eventTargetData; } |
| + virtual EventTargetData* ensureEventTargetData() OVERRIDE { return &m_eventTargetData; } |
| + |
| + EventTargetData m_eventTargetData; |
|
haraken
2013/08/15 14:10:28
Nit: Maybe this member should be private.
do-not-use
2013/08/15 14:47:39
Done.
|
| +}; |
| } // namespace WebCore |
| -#endif // DOMWindowBase64_h |
| +#endif // XMLHttpRequestEventTarget_h |