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 "../nativecommon", 20 "common", 21 "proxycontroller", 22 "webadsblockmanager", 23 "webasynccontroller", 24 "webcookiemanager", 25 "webdatabase", 26 "webfunction", 27 "webstorage", 28 "webviewcontroller", 29 "$target_gen_dir/protos", 30 "../../native", 31 "../../../ohos_adapter/ohos_resource_adapter/include", 32 "../../../ohos_adapter/system_properties_adapter/include", 33 ] 34} 35 36ohos_shared_library("webview_napi") { 37 if (target_cpu == "arm64") { 38 branch_protector_ret = "pac_ret" 39 } 40 41 public_configs = [ ":web_public_config" ] 42 43 sources = [ 44 "$target_gen_dir/protos/web_download.pb.cc", 45 "$target_gen_dir/protos/web_download.pb.h", 46 "common/business_error.cpp", 47 "common/napi_parse_utils.cpp", 48 "common/napi_webview_native_module.cpp", 49 "common/nweb_message_ext.cpp", 50 "proxycontroller/napi_proxy_config.cpp", 51 "proxycontroller/napi_proxy_config.h", 52 "proxycontroller/napi_proxy_controller.cpp", 53 "proxycontroller/napi_proxy_controller.h", 54 "proxycontroller/napi_proxy_rule.cpp", 55 "proxycontroller/napi_proxy_rule.h", 56 "proxycontroller/proxy_config.cpp", 57 "proxycontroller/proxy_config.h", 58 "proxycontroller/proxy_rule.cpp", 59 "proxycontroller/proxy_rule.h", 60 "webadsblockmanager/napi_web_adsblock_manager.cpp", 61 "webasynccontroller/napi_web_async_controller.cpp", 62 "webcookiemanager/napi_web_cookie_manager.cpp", 63 "webdatabase/napi_geolocation_permission.cpp", 64 "webdatabase/napi_web_data_base.cpp", 65 "webfunction/napi_webview_function.cpp", 66 "webfunction/webview_web_inited_callback.cpp", 67 "webstorage/napi_web_storage.cpp", 68 "webviewcontroller/napi_back_forward_cache_options.cpp", 69 "webviewcontroller/napi_back_forward_cache_options.h", 70 "webviewcontroller/napi_native_media_player.cpp", 71 "webviewcontroller/napi_native_media_player.h", 72 "webviewcontroller/napi_web_download_delegate.cpp", 73 "webviewcontroller/napi_web_download_delegate.h", 74 "webviewcontroller/napi_web_download_item.cpp", 75 "webviewcontroller/napi_web_download_item.h", 76 "webviewcontroller/napi_web_download_manager.cpp", 77 "webviewcontroller/napi_web_download_manager.h", 78 "webviewcontroller/napi_web_scheme_handler_request.cpp", 79 "webviewcontroller/napi_web_scheme_handler_request.h", 80 "webviewcontroller/napi_webview_controller.cpp", 81 "webviewcontroller/native_media_player_impl.cpp", 82 "webviewcontroller/native_media_player_impl.h", 83 "webviewcontroller/web_download_delegate.cpp", 84 "webviewcontroller/web_download_delegate.h", 85 "webviewcontroller/web_download_item.cpp", 86 "webviewcontroller/web_download_item.h", 87 "webviewcontroller/web_download_manager.cpp", 88 "webviewcontroller/web_download_manager.h", 89 "webviewcontroller/web_scheme_handler_request.cpp", 90 "webviewcontroller/web_scheme_handler_request.h", 91 "webviewcontroller/webview_controller.cpp", 92 "webviewcontroller/webview_createpdf_execute_callback.cpp", 93 "webviewcontroller/webview_hasimage_callback.cpp", 94 "webviewcontroller/webview_javascript_execute_callback.cpp", 95 "webviewcontroller/webview_javascript_result_callback.cpp", 96 ] 97 98 use_exceptions = true 99 100 external_deps = [ 101 "ability_base:extractortool", 102 "ability_runtime:app_context", 103 "ace_engine:ace_container_scope", 104 "bundle_framework:appexecfwk_base", 105 "bundle_framework:appexecfwk_core", 106 "c_utils:utils", 107 "common_event_service:cesfwk_innerkits", 108 "hilog:libhilog", 109 "image_framework:image", 110 "image_framework:image_native", 111 "init:libbegetutil", 112 "ipc:ipc_core", 113 "napi:ace_napi", 114 "protobuf:protobuf_lite", 115 "samgr:samgr_proxy", 116 "window_manager:libwm", 117 ] 118 119 deps = [ 120 "../nativecommon:webview_common", 121 "../../../arkweb_utils:libarkweb_utils", 122 "../../../ohos_adapter:nweb_ohos_adapter", 123 "../../../ohos_nweb:libnweb", 124 "../../native:ohweb", 125 "js:js_export", 126 "protos:proto_gen", 127 "../../../ohos_glue:ohos_base_glue_source", 128 "//base/web/webview/arkweb_utils:libarkweb_utils" 129 ] 130 131 relative_install_dir = "module/web" 132 133 part_name = "webview" 134 subsystem_name = "web" 135} 136 137ohos_shared_library("neterrorlist_napi") { 138 if (target_cpu == "arm64") { 139 branch_protector_ret = "pac_ret" 140 } 141 142 public_configs = [ ":web_public_config" ] 143 144 sources = [ 145 "web_net_error_code/napi_web_net_errorcode.cpp", 146 "web_net_error_code/napi_web_net_errorcode_module.cpp", 147 ] 148 149 external_deps = [ "napi:ace_napi" ] 150 151 relative_install_dir = "module/web" 152 153 part_name = "webview" 154 subsystem_name = "web" 155} 156