Home
last modified time | relevance | path

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

/base/web/webview/interfaces/kits/napi/webcookiemanager/
Dnapi_web_cookie_manager.cpp116 void NapiCallBackNullptr(napi_env env, napi_ref jsCallback) in NapiCallBackNullptr() argument
121 napi_get_reference_value(env, jsCallback, &callback); in NapiCallBackNullptr()
126 void FetchCookieAsyncCallback(napi_env env, napi_ref jsCallback, std::string url) in FetchCookieAsyncCallback() argument
130 NapiCallBackNullptr(env, jsCallback); in FetchCookieAsyncCallback()
131 napi_delete_reference(env, jsCallback); in FetchCookieAsyncCallback()
133 …callbackImpl = std::make_shared<OHOS::NWeb::NWebFetchCookieCallbackImpl>(env, jsCallback, nullptr); in FetchCookieAsyncCallback()
181 napi_ref jsCallback = nullptr; in JsFetchCookieAsync() local
182 napi_create_reference(env, argv[argcCallback - 1], INTEGER_ONE, &jsCallback); in JsFetchCookieAsync()
184 if (jsCallback) { in JsFetchCookieAsync()
185 FetchCookieAsyncCallback(env, jsCallback, url); in JsFetchCookieAsync()
[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/account/os_account/interfaces/kits/napi/appaccount/src/
Dnapi_app_account_authenticator.cpp339 napi_value jsCallback = nullptr; in CreateAuthenticatorCallback() local
340 NAPI_CALL(env, napi_new_instance(env, jsAuthCallbackConstructor, 0, nullptr, &jsCallback)); in CreateAuthenticatorCallback()
347 env, jsCallback, callback, in CreateAuthenticatorCallback()
354 return jsCallback; in CreateAuthenticatorCallback()
404 napi_value jsCallback = CreateAuthenticatorCallback(param->env, param->callback); in AddAccountImplicitlyWork() local
405 napi_value argv[] = { jsAuthType, jsCallerBundleName, jsOptions, jsCallback}; in AddAccountImplicitlyWork()
425 napi_value jsCallback = CreateAuthenticatorCallback(param->env, param->callback); in AuthenticateWork() local
426 napi_value argv[] = { jsName, jsAuthType, jsCallerBundleName, jsOptions, jsCallback}; in AuthenticateWork()
452 napi_value jsCallback = CreateAuthenticatorCallback(param->env, param->callback); in CreateAccountImplicitlyWork() local
453 napi_value argv[] = {jsObject, jsCallback}; in CreateAccountImplicitlyWork()
[all …]
/base/web/webview/interfaces/kits/napi/webviewcontroller/
Dwebview_controller.cpp344 napi_ref jsCallback) in StoreWebArchiveCallback() argument
354 napi_get_reference_value(env, jsCallback, &callback); in StoreWebArchiveCallback()
357 napi_delete_reference(env, jsCallback); in StoreWebArchiveCallback()
361 if (jsCallback == nullptr) { in StoreWebArchiveCallback()
366 callbackImpl->SetCallBack([env, jCallback = std::move(jsCallback)](std::string result) { in StoreWebArchiveCallback()
844 const std::string& script, napi_env env, napi_ref jsCallback, bool extention) in RunJavaScriptCallback() argument
854 napi_get_reference_value(env, jsCallback, &callback); in RunJavaScriptCallback()
857 napi_delete_reference(env, jsCallback); in RunJavaScriptCallback()
861 if (jsCallback == nullptr) { in RunJavaScriptCallback()
865 …auto callbackImpl = std::make_shared<WebviewJavaScriptExecuteCallback>(env, jsCallback, nullptr, e… in RunJavaScriptCallback()
[all …]
Dwebview_controller.h139 …eWebArchiveCallback(const std::string &baseName, bool autoName, napi_env env, napi_ref jsCallback);
186 …void RunJavaScriptCallback(const std::string &script, napi_env env, napi_ref jsCallback, bool exte…
198 ErrCode HasImagesCallback(napi_env env, napi_ref jsCallback);
Dnapi_webview_controller.cpp2203 napi_ref jsCallback = nullptr; in StoreWebArchiveInternal() local
2204 napi_create_reference(env, argv[argcCallback - 1], 1, &jsCallback); in StoreWebArchiveInternal()
2206 if (jsCallback) { in StoreWebArchiveInternal()
2207 … webviewController->StoreWebArchiveCallback(baseName, autoName, env, std::move(jsCallback)); in StoreWebArchiveInternal()
2801 napi_ref jsCallback = nullptr; in RunJavaScriptInternal() local
2802 napi_create_reference(env, argv[argcCallback - 1], 1, &jsCallback); in RunJavaScriptInternal()
2804 if (jsCallback) { in RunJavaScriptInternal()
2805 webviewController->RunJavaScriptCallback(script, env, std::move(jsCallback), extention); in RunJavaScriptInternal()
2949 napi_ref jsCallback = nullptr; in HasImageInternal() local
2950 napi_create_reference(env, argv[argcCallbackParaNum - 1], 1, &jsCallback); in HasImageInternal()
[all …]
/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/notification/distributed_notification_service/frameworks/js/napi/src/manager/
Dnapi_enable_notification.cpp303 auto jsCallback = std::make_unique<JsAnsDialogCallback>(); in NapiRequestEnableNotification() local
304 …if (!jsCallback->Init(env, asynccallbackinfo, NapiAsyncCompleteCallbackRequestEnableNotification) … in NapiRequestEnableNotification()
305 !AnsDialogHostClient::SetDialogCallbackInterface(std::move(jsCallback)) in NapiRequestEnableNotification()
/base/account/os_account/interfaces/kits/napi/account_iam/src/
Dnapi_account_iam_user_auth.cpp233 std::shared_ptr<JsIAMCallback> jsCallback = std::make_shared<JsIAMCallback>(env); in ParseContextForAuth() local
234 if (ParseIAMCallback(env, argv[index++], jsCallback) != napi_ok) { in ParseContextForAuth()
238 context.callback = std::make_shared<NapiUserAuthCallback>(env, jsCallback); in ParseContextForAuth()
/base/notification/distributed_notification_service/frameworks/js/napi/src/
Denable_notification.cpp410 auto jsCallback = std::make_unique<JsAnsDialogCallback>(); in RequestEnableNotification() local
411 … if (!jsCallback->Init(env, asynccallbackinfo, AsyncCompleteCallbackRequestEnableNotification) || in RequestEnableNotification()
412 !AnsDialogHostClient::SetDialogCallbackInterface(std::move(jsCallback)) in RequestEnableNotification()
/base/account/os_account/interfaces/kits/napi/domain_account/src/
Dnapi_domain_account_manager.cpp1065 … auto jsCallback = std::make_shared<JsDomainAccountAuthCallback>(env, param->callbackRef); in Auth() local
1066 auto callback = std::make_shared<NapiDomainAccountCallback>(env, jsCallback); in Auth()
1171 … auto jsCallback = std::make_shared<JsDomainAccountAuthCallback>(env, param->callbackRef); in AuthWithPopup() local
1172 auto callback = std::make_shared<NapiDomainAccountCallback>(env, jsCallback); in AuthWithPopup()
/base/notification/eventhandler/frameworks/napi/src/
Devents_emitter.cpp103 void ThreadSafeCallback(napi_env env, napi_value jsCallback, void* context, void* data) in ThreadSafeCallback() argument