tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

XMLHttpRequestEventTarget.h (1524B)


      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 
     12 namespace mozilla::dom {
     13 
     14 class XMLHttpRequestEventTarget : public DOMEventTargetHelper {
     15 protected:
     16  explicit XMLHttpRequestEventTarget(DOMEventTargetHelper* aOwner)
     17      : DOMEventTargetHelper(aOwner) {}
     18 
     19  explicit XMLHttpRequestEventTarget(nsIGlobalObject* aGlobalObject)
     20      : DOMEventTargetHelper(aGlobalObject) {}
     21 
     22  virtual ~XMLHttpRequestEventTarget() = default;
     23 
     24 public:
     25  NS_DECL_ISUPPORTS_INHERITED
     26  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XMLHttpRequestEventTarget,
     27                                           DOMEventTargetHelper)
     28 
     29  mozilla::Maybe<EventCallbackDebuggerNotificationType>
     30  GetDebuggerNotificationType() const override;
     31 
     32  IMPL_EVENT_HANDLER(loadstart)
     33  IMPL_EVENT_HANDLER(progress)
     34  IMPL_EVENT_HANDLER(abort)
     35  IMPL_EVENT_HANDLER(error)
     36  IMPL_EVENT_HANDLER(load)
     37  IMPL_EVENT_HANDLER(timeout)
     38  IMPL_EVENT_HANDLER(loadend)
     39 
     40  nsISupports* GetParentObject() const { return GetOwnerGlobal(); }
     41  void DisconnectFromOwner() override;
     42 };
     43 
     44 }  // namespace mozilla::dom
     45 
     46 #endif  // mozilla_dom_XMLHttpRequestEventTarget_h