зеркало из https://github.com/mozilla/gecko-dev.git
add cookie viewer and singon viewer
This commit is contained in:
Родитель
19624c3e5d
Коммит
23b28379e5
|
@ -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},
|
||||
|
|
Загрузка…
Ссылка в новой задаче