bug 700693 - OCSP stapling PSM changes r=bsmith
[gecko.git] / dom / workers / ScriptLoader.h
blobcb79abea251004fae3a9b2a000b00d3b18cd21d4
1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
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
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_workers_scriptloader_h__
7 #define mozilla_dom_workers_scriptloader_h__
9 #include "Workers.h"
11 #include "jsapi.h"
13 class nsIPrincipal;
14 class nsIURI;
15 class nsIDocument;
16 class nsString;
17 class nsIChannel;
19 BEGIN_WORKERS_NAMESPACE
21 namespace scriptloader {
23 nsresult
24 ChannelFromScriptURLMainThread(nsIPrincipal* aPrincipal,
25 nsIURI* aBaseURI,
26 nsIDocument* aParentDoc,
27 const nsString& aScriptURL,
28 nsIChannel** aChannel);
30 nsresult
31 ChannelFromScriptURLWorkerThread(JSContext* aCx,
32 WorkerPrivate* aParent,
33 const nsString& aScriptURL,
34 nsIChannel** aChannel);
36 void ReportLoadError(JSContext* aCx, const nsString& aURL,
37 nsresult aLoadResult, bool aIsMainThread);
39 bool LoadWorkerScript(JSContext* aCx);
41 bool Load(JSContext* aCx, unsigned aURLCount, jsval* aURLs);
43 } // namespace scriptloader
45 END_WORKERS_NAMESPACE
47 #endif /* mozilla_dom_workers_scriptloader_h__ */