add cookie viewer and singon viewer

This commit is contained in:
morse%netscape.com 1999-04-21 03:43:49 +00:00
Родитель 19624c3e5d
Коммит 23b28379e5
1 изменённых файлов: 67 добавлений и 0 удалений

Просмотреть файл

@ -396,6 +396,71 @@ BrowserAppCoreWalletSamples(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
}
//
// Native method SignonViewer
//
PR_STATIC_CALLBACK(JSBool)
BrowserAppCoreSignonViewer(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMBrowserAppCore *nativeThis = (nsIDOMBrowserAppCore*)JS_GetPrivate(cx, obj);
JSBool rBool = JS_FALSE;
*rval = JSVAL_NULL;
// If there's no private data, this must be the prototype, so ignore
if (nsnull == nativeThis) {
return JS_TRUE;
}
if (argc >= 0) {
if (NS_OK != nativeThis->SignonViewer()) {
return JS_FALSE;
}
*rval = JSVAL_VOID;
}
else {
JS_ReportError(cx, "Function signonViewer requires 0 parameters");
return JS_FALSE;
}
return JS_TRUE;
}
//
// Native method CookieViewer
//
PR_STATIC_CALLBACK(JSBool)
BrowserAppCoreCookieViewer(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMBrowserAppCore *nativeThis = (nsIDOMBrowserAppCore*)JS_GetPrivate(cx, obj);
JSBool rBool = JS_FALSE;
*rval = JSVAL_NULL;
// If there's no private data, this must be the prototype, so ignore
if (nsnull == nativeThis) {
return JS_TRUE;
}
if (argc >= 0) {
if (NS_OK != nativeThis->CookieViewer()) {
return JS_FALSE;
}
*rval = JSVAL_VOID;
}
else {
JS_ReportError(cx, "Function cookieViewer requires 0 parameters");
return JS_FALSE;
}
return JS_TRUE;
}
//
// Native method SetToolbarWindow
//
@ -793,6 +858,8 @@ static JSFunctionSpec BrowserAppCoreMethods[] =
{"walletSafeFillin", BrowserAppCoreWalletSafeFillin, 0},
{"walletQuickFillin", BrowserAppCoreWalletQuickFillin, 0},
{"walletSamples", BrowserAppCoreWalletSamples, 0},
{"signonViewer", BrowserAppCoreSignonViewer, 0},
{"cookieViewer", BrowserAppCoreCookieViewer, 0},
{"setToolbarWindow", BrowserAppCoreSetToolbarWindow, 1},
{"setContentWindow", BrowserAppCoreSetContentWindow, 1},
{"setWebShellWindow", BrowserAppCoreSetWebShellWindow, 1},