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