Bug 1685822 [wpt PR 27117] - [Import Maps] Add tests for rejecting multiple import...
[gecko.git] / dom / xhr / XMLHttpRequestEventTarget.h
blobbdc6ce26327894e86f3664ec9225eda1e3b10aef
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/. */
7 #ifndef mozilla_dom_XMLHttpRequestEventTarget_h
8 #define mozilla_dom_XMLHttpRequestEventTarget_h
10 #include "mozilla/DOMEventTargetHelper.h"
12 namespace mozilla {
13 namespace dom {
15 class XMLHttpRequestEventTarget : public DOMEventTargetHelper {
16 protected:
17 explicit XMLHttpRequestEventTarget(DOMEventTargetHelper* aOwner)
18 : DOMEventTargetHelper(aOwner) {}
20 explicit XMLHttpRequestEventTarget(nsIGlobalObject* aGlobalObject)
21 : DOMEventTargetHelper(aGlobalObject) {}
23 virtual ~XMLHttpRequestEventTarget() = default;
25 public:
26 NS_DECL_ISUPPORTS_INHERITED
27 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XMLHttpRequestEventTarget,
28 DOMEventTargetHelper)
30 mozilla::Maybe<EventCallbackDebuggerNotificationType>
31 GetDebuggerNotificationType() const override;
33 IMPL_EVENT_HANDLER(loadstart)
34 IMPL_EVENT_HANDLER(progress)
35 IMPL_EVENT_HANDLER(abort)
36 IMPL_EVENT_HANDLER(error)
37 IMPL_EVENT_HANDLER(load)
38 IMPL_EVENT_HANDLER(timeout)
39 IMPL_EVENT_HANDLER(loadend)
41 nsISupports* GetParentObject() const { return GetOwner(); }
43 virtual void DisconnectFromOwner() override;
46 } // namespace dom
47 } // namespace mozilla
49 #endif // mozilla_dom_XMLHttpRequestEventTarget_h