2014-04-03 15:58:00 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim: set ts=8 sts=4 et sw=4 tw=99: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2012-05-21 15:12:37 +04:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-03-14 05:41:55 +03:00
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "mozIJSSubScriptLoader.h"
|
2013-09-10 01:14:10 +04:00
|
|
|
|
|
|
|
class nsIPrincipal;
|
|
|
|
class nsIURI;
|
2013-11-05 19:35:41 +04:00
|
|
|
class LoadSubScriptOptions;
|
2001-03-14 05:41:55 +03:00
|
|
|
|
2011-10-14 21:52:48 +04:00
|
|
|
#define MOZ_JSSUBSCRIPTLOADER_CID \
|
|
|
|
{ /* 829814d6-1dd2-11b2-8e08-82fa0a339b00 */ \
|
|
|
|
0x929814d6, \
|
|
|
|
0x1dd2, \
|
|
|
|
0x11b2, \
|
|
|
|
{0x8e, 0x08, 0x82, 0xfa, 0x0a, 0x33, 0x9b, 0x00} \
|
2001-03-14 05:41:55 +03:00
|
|
|
}
|
|
|
|
|
2011-07-10 07:21:16 +04:00
|
|
|
class nsIIOService;
|
|
|
|
|
2001-03-14 05:41:55 +03:00
|
|
|
class mozJSSubScriptLoader : public mozIJSSubScriptLoader
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
mozJSSubScriptLoader();
|
|
|
|
|
|
|
|
// all the interface method declarations...
|
2014-01-16 20:49:26 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
2001-03-14 05:41:55 +03:00
|
|
|
NS_DECL_MOZIJSSUBSCRIPTLOADER
|
|
|
|
|
|
|
|
private:
|
2014-06-23 22:49:08 +04:00
|
|
|
virtual ~mozJSSubScriptLoader();
|
|
|
|
|
2017-04-15 02:35:34 +03:00
|
|
|
bool ReadScript(nsIURI* uri, JSContext* cx, JS::HandleObject targetObj,
|
2016-12-03 04:36:42 +03:00
|
|
|
const nsAString& charset, const char* uriStr,
|
2017-04-15 02:43:08 +03:00
|
|
|
nsIIOService* serv,
|
2017-05-16 01:04:45 +03:00
|
|
|
bool wantReturnValue,
|
2017-05-17 19:21:54 +03:00
|
|
|
JS::MutableHandleScript script);
|
2011-07-10 07:21:16 +04:00
|
|
|
|
2017-05-16 01:04:45 +03:00
|
|
|
nsresult ReadScriptAsync(nsIURI* uri,
|
|
|
|
JS::HandleObject targetObj,
|
2015-05-21 08:14:49 +03:00
|
|
|
const nsAString& charset,
|
2017-05-16 01:04:45 +03:00
|
|
|
nsIIOService* serv,
|
|
|
|
bool wantReturnValue,
|
|
|
|
bool cache,
|
2017-04-15 19:32:34 +03:00
|
|
|
JS::MutableHandleValue retval);
|
2015-05-21 08:14:49 +03:00
|
|
|
|
2015-03-29 01:22:11 +03:00
|
|
|
nsresult DoLoadSubScriptWithOptions(const nsAString& url,
|
|
|
|
LoadSubScriptOptions& options,
|
|
|
|
JSContext* cx,
|
2017-04-15 16:47:07 +03:00
|
|
|
JS::MutableHandleValue retval);
|
2001-03-14 05:41:55 +03:00
|
|
|
};
|