XMLHttpRequestUpload.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef mozilla_dom_XMLHttpRequestUpload_h
  6. #define mozilla_dom_XMLHttpRequestUpload_h
  7. #include "mozilla/dom/XMLHttpRequestEventTarget.h"
  8. #include "nsIXMLHttpRequest.h"
  9. namespace mozilla {
  10. namespace dom {
  11. class XMLHttpRequestUpload final : public XMLHttpRequestEventTarget,
  12. public nsIXMLHttpRequestUpload
  13. {
  14. public:
  15. explicit XMLHttpRequestUpload(DOMEventTargetHelper* aOwner)
  16. : XMLHttpRequestEventTarget(aOwner)
  17. {}
  18. explicit XMLHttpRequestUpload()
  19. {}
  20. NS_DECL_ISUPPORTS_INHERITED
  21. NS_FORWARD_NSIXMLHTTPREQUESTEVENTTARGET(XMLHttpRequestEventTarget::)
  22. NS_REALLY_FORWARD_NSIDOMEVENTTARGET(XMLHttpRequestEventTarget)
  23. NS_DECL_NSIXMLHTTPREQUESTUPLOAD
  24. virtual JSObject*
  25. WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
  26. bool HasListeners()
  27. {
  28. return mListenerManager && mListenerManager->HasListeners();
  29. }
  30. private:
  31. virtual ~XMLHttpRequestUpload()
  32. {}
  33. };
  34. } // dom namespace
  35. } // mozilla namespace
  36. #endif // mozilla_dom_XMLHttpRequestUpload_h