Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* vim: set ts=8 sts=4 et sw=4 tw=99: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsCOMPtr.h" |
michael@0 | 8 | #include "mozIJSSubScriptLoader.h" |
michael@0 | 9 | |
michael@0 | 10 | class nsIPrincipal; |
michael@0 | 11 | class nsIURI; |
michael@0 | 12 | class LoadSubScriptOptions; |
michael@0 | 13 | |
michael@0 | 14 | #define MOZ_JSSUBSCRIPTLOADER_CID \ |
michael@0 | 15 | { /* 829814d6-1dd2-11b2-8e08-82fa0a339b00 */ \ |
michael@0 | 16 | 0x929814d6, \ |
michael@0 | 17 | 0x1dd2, \ |
michael@0 | 18 | 0x11b2, \ |
michael@0 | 19 | {0x8e, 0x08, 0x82, 0xfa, 0x0a, 0x33, 0x9b, 0x00} \ |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | class nsIIOService; |
michael@0 | 23 | |
michael@0 | 24 | class mozJSSubScriptLoader : public mozIJSSubScriptLoader |
michael@0 | 25 | { |
michael@0 | 26 | public: |
michael@0 | 27 | mozJSSubScriptLoader(); |
michael@0 | 28 | virtual ~mozJSSubScriptLoader(); |
michael@0 | 29 | |
michael@0 | 30 | // all the interface method declarations... |
michael@0 | 31 | NS_DECL_ISUPPORTS |
michael@0 | 32 | NS_DECL_MOZIJSSUBSCRIPTLOADER |
michael@0 | 33 | |
michael@0 | 34 | private: |
michael@0 | 35 | nsresult ReadScript(nsIURI *uri, JSContext *cx, JSObject *target_obj, |
michael@0 | 36 | const nsAString &charset, const char *uriStr, |
michael@0 | 37 | nsIIOService *serv, nsIPrincipal *principal, |
michael@0 | 38 | bool reuseGlobal, JS::MutableHandleScript script, |
michael@0 | 39 | JS::MutableHandleFunction function); |
michael@0 | 40 | |
michael@0 | 41 | nsresult DoLoadSubScriptWithOptions(const nsAString &url, |
michael@0 | 42 | LoadSubScriptOptions &options, |
michael@0 | 43 | JSContext *cx, |
michael@0 | 44 | JS::MutableHandle<JS::Value> retval); |
michael@0 | 45 | |
michael@0 | 46 | nsCOMPtr<nsIPrincipal> mSystemPrincipal; |
michael@0 | 47 | }; |