Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 : * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef mozilla_dom_XMLHttpRequestEventTarget_h
8 : #define mozilla_dom_XMLHttpRequestEventTarget_h
9 :
10 : #include "mozilla/DOMEventTargetHelper.h"
11 : #include "nsIXMLHttpRequest.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class XMLHttpRequestEventTarget : public DOMEventTargetHelper,
17 : public nsIXMLHttpRequestEventTarget
18 : {
19 : protected:
20 3 : explicit XMLHttpRequestEventTarget(DOMEventTargetHelper* aOwner)
21 3 : : DOMEventTargetHelper(aOwner)
22 3 : {}
23 :
24 6 : XMLHttpRequestEventTarget()
25 6 : {}
26 :
27 0 : virtual ~XMLHttpRequestEventTarget() {}
28 :
29 : public:
30 : NS_DECL_ISUPPORTS_INHERITED
31 36 : NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XMLHttpRequestEventTarget,
32 : DOMEventTargetHelper)
33 : NS_DECL_NSIXMLHTTPREQUESTEVENTTARGET
34 359 : NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
35 :
36 0 : IMPL_EVENT_HANDLER(loadstart)
37 0 : IMPL_EVENT_HANDLER(progress)
38 0 : IMPL_EVENT_HANDLER(abort)
39 0 : IMPL_EVENT_HANDLER(error)
40 0 : IMPL_EVENT_HANDLER(load)
41 0 : IMPL_EVENT_HANDLER(timeout)
42 0 : IMPL_EVENT_HANDLER(loadend)
43 :
44 6 : nsISupports* GetParentObject() const
45 : {
46 6 : return GetOwner();
47 : }
48 :
49 : virtual void DisconnectFromOwner() override;
50 : };
51 :
52 : } // dom namespace
53 : } // mozilla namespace
54 :
55 : #endif // mozilla_dom_XMLHttpRequestEventTarget_h
|