1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15 16config("web_public_config") { 17 visibility = [ ":*" ] 18 include_dirs = [ 19 "common", 20 "webadsblockmanager", 21 "webasynccontroller", 22 "webcookiemanager", 23 "webdatabase", 24 "webfunction", 25 "webstorage", 26 "webviewcontroller", 27 "$target_gen_dir/protos", 28 "../../native", 29 "../../../ohos_adapter/ohos_resource_adapter/include", 30 ] 31} 32 33ohos_shared_library("webview_napi") { 34 if (target_cpu == "arm64") { 35 branch_protector_ret = "pac_ret" 36 branch_protector_frt = "bti" 37 } 38 39 public_configs = [ ":web_public_config" ] 40 41 sources = [ 42 "$target_gen_dir/protos/web_download.pb.cc", 43 "$target_gen_dir/protos/web_download.pb.h", 44 "common/business_error.cpp", 45 "common/napi_parse_utils.cpp", 46 "common/napi_webview_native_module.cpp", 47 "common/web_errors.cpp", 48 "webadsblockmanager/napi_web_adsblock_manager.cpp", 49 "webasynccontroller/napi_web_async_controller.cpp", 50 "webcookiemanager/napi_web_cookie_manager.cpp", 51 "webdatabase/napi_geolocation_permission.cpp", 52 "webdatabase/napi_web_data_base.cpp", 53 "webfunction/napi_webview_function.cpp", 54 "webfunction/webview_web_inited_callback.cpp", 55 "webstorage/napi_web_storage.cpp", 56 "webviewcontroller/napi_back_forward_cache_options.cpp", 57 "webviewcontroller/napi_back_forward_cache_options.h", 58 "webviewcontroller/napi_native_media_player.cpp", 59 "webviewcontroller/napi_native_media_player.h", 60 "webviewcontroller/napi_web_download_delegate.cpp", 61 "webviewcontroller/napi_web_download_delegate.h", 62 "webviewcontroller/napi_web_download_item.cpp", 63 "webviewcontroller/napi_web_download_item.h", 64 "webviewcontroller/napi_web_download_manager.cpp", 65 "webviewcontroller/napi_web_download_manager.h", 66 "webviewcontroller/napi_web_scheme_handler_request.cpp", 67 "webviewcontroller/napi_web_scheme_handler_request.h", 68 "webviewcontroller/napi_webview_controller.cpp", 69 "webviewcontroller/native_media_player_impl.cpp", 70 "webviewcontroller/native_media_player_impl.h", 71 "webviewcontroller/web_download_delegate.cpp", 72 "webviewcontroller/web_download_delegate.h", 73 "webviewcontroller/web_download_item.cpp", 74 "webviewcontroller/web_download_item.h", 75 "webviewcontroller/web_download_manager.cpp", 76 "webviewcontroller/web_download_manager.h", 77 "webviewcontroller/web_scheme_handler_request.cpp", 78 "webviewcontroller/web_scheme_handler_request.h", 79 "webviewcontroller/webview_controller.cpp", 80 "webviewcontroller/webview_createpdf_execute_callback.cpp", 81 "webviewcontroller/webview_hasimage_callback.cpp", 82 "webviewcontroller/webview_javascript_execute_callback.cpp", 83 "webviewcontroller/webview_javascript_result_callback.cpp", 84 ] 85 86 use_exceptions = true 87 88 external_deps = [ 89 "ability_base:extractortool", 90 "ability_runtime:app_context", 91 "bundle_framework:appexecfwk_base", 92 "bundle_framework:appexecfwk_core", 93 "c_utils:utils", 94 "common_event_service:cesfwk_innerkits", 95 "hilog:libhilog", 96 "image_framework:image", 97 "image_framework:image_native", 98 "init:libbegetutil", 99 "ipc:ipc_core", 100 "napi:ace_container_scope", 101 "napi:ace_napi", 102 "protobuf:protobuf_lite", 103 "samgr:samgr_proxy", 104 "window_manager:libwm", 105 ] 106 107 deps = [ 108 "../../../ohos_adapter:nweb_ohos_adapter", 109 "../../../ohos_nweb:libnweb", 110 "../../native:ohweb", 111 "js:js_export", 112 "protos:proto_gen", 113 ] 114 115 relative_install_dir = "module/web" 116 117 part_name = "webview" 118 subsystem_name = "web" 119} 120 121ohos_shared_library("neterrorlist_napi") { 122 if (target_cpu == "arm64") { 123 branch_protector_ret = "pac_ret" 124 branch_protector_frt = "bti" 125 } 126 127 public_configs = [ ":web_public_config" ] 128 129 sources = [ 130 "web_net_error_code/napi_web_net_errorcode.cpp", 131 "web_net_error_code/napi_web_net_errorcode_module.cpp", 132 ] 133 134 external_deps = [ "napi:ace_napi" ] 135 136 relative_install_dir = "module/web" 137 138 part_name = "webview" 139 subsystem_name = "web" 140} 141