Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1422)

Unified Diff: Source/core/xml/XMLHttpRequestEventTarget.h

Issue 23243002: Introduce XMLHttpRequestEventTarget IDL interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698