js/xpconnect/idl/nsIXPCSecurityManager.idl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:7aaf16bcded1
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #include "nsISupports.idl"
8
9 [ptr] native nsAXPCNativeCallContextPtr(nsAXPCNativeCallContext);
10
11 %{ C++
12 #include "jspubtd.h"
13
14 class nsAXPCNativeCallContext;
15 %}
16
17 interface nsIClassInfo;
18
19 [ptr] native JSContextPtr(JSContext);
20 [ptr] native JSObjectPtr(JSObject);
21 [ptr] native JSStackFramePtr(JSStackFrame);
22
23 [uuid(d4d21714-116b-4851-a785-098c5dfea523)]
24 interface nsIXPCSecurityManager : nsISupports
25 {
26 /**
27 * For each of these hooks returning NS_OK means 'let the action continue'.
28 * Returning an error code means 'veto the action'. XPConnect will return
29 * false to the js engine if the action is vetoed. The implementor of this
30 * interface is responsible for setting a JS exception into the JSContext
31 * if that is appropriate.
32 */
33
34 void CanCreateWrapper(in JSContextPtr aJSContext,
35 in nsIIDRef aIID,
36 in nsISupports aObj,
37 in nsIClassInfo aClassInfo);
38
39 void CanCreateInstance(in JSContextPtr aJSContext,
40 in nsCIDRef aCID);
41
42 void CanGetService(in JSContextPtr aJSContext,
43 in nsCIDRef aCID);
44 };

mercurial