michael@0: /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_workers_xmlhttprequestupload_h__ michael@0: #define mozilla_dom_workers_xmlhttprequestupload_h__ michael@0: michael@0: #include "nsXMLHttpRequest.h" michael@0: michael@0: BEGIN_WORKERS_NAMESPACE michael@0: michael@0: class XMLHttpRequest; michael@0: michael@0: class XMLHttpRequestUpload MOZ_FINAL : public nsXHREventTarget michael@0: { michael@0: nsRefPtr mXHR; michael@0: michael@0: XMLHttpRequestUpload(XMLHttpRequest* aXHR); michael@0: michael@0: ~XMLHttpRequestUpload(); michael@0: michael@0: public: michael@0: virtual JSObject* michael@0: WrapObject(JSContext* aCx) MOZ_OVERRIDE; michael@0: michael@0: static already_AddRefed michael@0: Create(XMLHttpRequest* aXHR); michael@0: michael@0: NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XMLHttpRequestUpload, nsXHREventTarget) michael@0: michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: michael@0: nsISupports* michael@0: GetParentObject() const michael@0: { michael@0: // There's only one global on a worker, so we don't need to specify. michael@0: return nullptr; michael@0: } michael@0: michael@0: bool michael@0: HasListeners() michael@0: { michael@0: return mListenerManager && mListenerManager->HasListeners(); michael@0: } michael@0: }; michael@0: michael@0: END_WORKERS_NAMESPACE michael@0: michael@0: #endif // mozilla_dom_workers_xmlhttprequestupload_h__