Home
last modified time | relevance | path

Searched refs:jsCallback (Results 1 – 10 of 10) sorted by relevance

/base/account/os_account/interfaces/kits/napi/appaccount/src/
Dnapi_app_account_authenticator.cpp280 napi_value jsCallback = nullptr; in CreateAuthenticatorCallback() local
281 NAPI_CALL(env, napi_new_instance(env, jsAuthCallbackConstructor, 0, nullptr, &jsCallback)); in CreateAuthenticatorCallback()
288 env, jsCallback, callback, in CreateAuthenticatorCallback()
295 return jsCallback; in CreateAuthenticatorCallback()
340 napi_value jsCallback = CreateAuthenticatorCallback(param->env, param->callback); in AddAccountImplicitlyWork() local
341 napi_value argv[] = { jsAuthType, jsCallerBundleName, jsOptions, jsCallback}; in AddAccountImplicitlyWork()
355 napi_value jsCallback = CreateAuthenticatorCallback(param->env, param->callback); in AuthenticateWork() local
356 napi_value argv[] = { jsName, jsAuthType, jsCallerBundleName, jsOptions, jsCallback}; in AuthenticateWork()
376 napi_value jsCallback = CreateAuthenticatorCallback(param->env, param->callback); in CreateAccountImplicitlyWork() local
377 napi_value argv[] = {jsObject, jsCallback}; in CreateAccountImplicitlyWork()
[all …]
/base/web/webview/interfaces/kits/napi/webasynccontroller/
Dnapi_web_async_controller.cpp74 napi_ref jsCallback = nullptr; in StoreWebArchiveInternal() local
75 napi_create_reference(env, argv[argcCallback - 1], 1, &jsCallback); in StoreWebArchiveInternal()
77 if (jsCallback) { in StoreWebArchiveInternal()
78 … webAsyncController->StoreWebArchiveCallback(baseName, autoName, env, std::move(jsCallback)); in StoreWebArchiveInternal()
195 napi_ref jsCallback) in StoreWebArchiveCallback() argument
205 napi_get_reference_value(env, jsCallback, &callback); in StoreWebArchiveCallback()
208 napi_delete_reference(env, jsCallback); in StoreWebArchiveCallback()
212 if (jsCallback == nullptr) { in StoreWebArchiveCallback()
217 callbackImpl->SetCallBack([env, jCallback = std::move(jsCallback)](std::string result) { in StoreWebArchiveCallback()
Dnapi_web_async_controller.h42 …eWebArchiveCallback(const std::string &baseName, bool autoName, napi_env env, napi_ref jsCallback);
/base/web/webview/interfaces/kits/napi/webviewcontroller/
Dwebview_controller.cpp208 napi_ref jsCallback) in StoreWebArchiveCallback() argument
218 napi_get_reference_value(env, jsCallback, &callback); in StoreWebArchiveCallback()
221 napi_delete_reference(env, jsCallback); in StoreWebArchiveCallback()
225 if (jsCallback == nullptr) { in StoreWebArchiveCallback()
230 callbackImpl->SetCallBack([env, jCallback = std::move(jsCallback)](std::string result) { in StoreWebArchiveCallback()
673 …viewController::RunJavaScriptCallback(const std::string &script, napi_env env, napi_ref jsCallback) in RunJavaScriptCallback() argument
683 napi_get_reference_value(env, jsCallback, &callback); in RunJavaScriptCallback()
686 napi_delete_reference(env, jsCallback); in RunJavaScriptCallback()
690 if (jsCallback == nullptr) { in RunJavaScriptCallback()
694 … auto callbackImpl = std::make_shared<WebviewJavaScriptExecuteCallback>(env, jsCallback, nullptr); in RunJavaScriptCallback()
[all …]
Dwebview_controller.h102 …eWebArchiveCallback(const std::string &baseName, bool autoName, napi_env env, napi_ref jsCallback);
147 void RunJavaScriptCallback(const std::string &script, napi_env env, napi_ref jsCallback);
159 ErrCode HasImagesCallback(napi_env env, napi_ref jsCallback);
Dnapi_webview_controller.cpp1160 napi_ref jsCallback = nullptr; in StoreWebArchiveInternal() local
1161 napi_create_reference(env, argv[argcCallback - 1], 1, &jsCallback); in StoreWebArchiveInternal()
1163 if (jsCallback) { in StoreWebArchiveInternal()
1164 … webviewController->StoreWebArchiveCallback(baseName, autoName, env, std::move(jsCallback)); in StoreWebArchiveInternal()
1690 napi_ref jsCallback = nullptr; in RunJavaScriptInternal() local
1691 napi_create_reference(env, argv[argcCallback - 1], 1, &jsCallback); in RunJavaScriptInternal()
1693 if (jsCallback) { in RunJavaScriptInternal()
1694 webviewController->RunJavaScriptCallback(script, env, std::move(jsCallback)); in RunJavaScriptInternal()
1848 napi_ref jsCallback = nullptr; in HasImageInternal() local
1849 napi_create_reference(env, argv[argcCallbackParaNum - 1], 1, &jsCallback); in HasImageInternal()
[all …]
/base/web/webview/interfaces/kits/napi/webcookiemanager/
Dnapi_web_cookie_manager.cpp302 void SaveCookieAsyncCallback(napi_env env, napi_ref jsCallback) in SaveCookieAsyncCallback() argument
309 napi_get_reference_value(env, jsCallback, &callback); in SaveCookieAsyncCallback()
312 napi_delete_reference(env, jsCallback); in SaveCookieAsyncCallback()
314 … callbackImpl = std::make_shared<OHOS::NWeb::NWebSaveCookieCallbackImpl>(env, jsCallback, nullptr); in SaveCookieAsyncCallback()
357 napi_ref jsCallback = nullptr; in JsSaveCookieAsync() local
358 napi_create_reference(env, argv[argcCallback - 1], INTEGER_ONE, &jsCallback); in JsSaveCookieAsync()
360 if (jsCallback) { in JsSaveCookieAsync()
361 SaveCookieAsyncCallback(env, jsCallback); in JsSaveCookieAsync()
/base/powermgr/thermal_manager/frameworks/napi/
Dthermal_manager_napi.h34 void UpdateCallback(napi_env env, napi_value jsCallback);
Dthermal_manager_napi.cpp41 void ThermalLevelCallback::UpdateCallback(napi_env env, napi_value jsCallback) in UpdateCallback() argument
44 if (napi_ok != napi_create_reference(env, jsCallback, 1, &callbackRef_)) { in UpdateCallback()
/base/account/os_account/interfaces/kits/napi/account_iam/src/
Dnapi_account_iam_user_auth.cpp247 JsIAMCallback jsCallback; in ParseContextForAuth() local
248 if (ParseIAMCallback(env, argv[index++], jsCallback) != napi_ok) { in ParseContextForAuth()
254 NapiUserAuthCallback *object = new (std::nothrow) NapiUserAuthCallback(env, jsCallback); in ParseContextForAuth()