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 michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_workers_scriptloader_h__ michael@0: #define mozilla_dom_workers_scriptloader_h__ michael@0: michael@0: #include "Workers.h" michael@0: michael@0: class nsIPrincipal; michael@0: class nsIURI; michael@0: class nsIDocument; michael@0: class nsString; michael@0: class nsIChannel; michael@0: michael@0: namespace mozilla { michael@0: michael@0: class ErrorResult; michael@0: michael@0: namespace dom { michael@0: michael@0: template michael@0: class Sequence; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: BEGIN_WORKERS_NAMESPACE michael@0: michael@0: namespace scriptloader { michael@0: michael@0: nsresult michael@0: ChannelFromScriptURLMainThread(nsIPrincipal* aPrincipal, michael@0: nsIURI* aBaseURI, michael@0: nsIDocument* aParentDoc, michael@0: const nsAString& aScriptURL, michael@0: nsIChannel** aChannel); michael@0: michael@0: nsresult michael@0: ChannelFromScriptURLWorkerThread(JSContext* aCx, michael@0: WorkerPrivate* aParent, michael@0: const nsAString& aScriptURL, michael@0: nsIChannel** aChannel); michael@0: michael@0: void ReportLoadError(JSContext* aCx, const nsAString& aURL, michael@0: nsresult aLoadResult, bool aIsMainThread); michael@0: michael@0: bool LoadWorkerScript(JSContext* aCx); michael@0: michael@0: void Load(JSContext* aCx, michael@0: WorkerPrivate* aWorkerPrivate, michael@0: const mozilla::dom::Sequence& aScriptURLs, michael@0: mozilla::ErrorResult& aRv); michael@0: michael@0: } // namespace scriptloader michael@0: michael@0: END_WORKERS_NAMESPACE michael@0: michael@0: #endif /* mozilla_dom_workers_scriptloader_h__ */