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_hasimage_callback.cpp", 81 "webviewcontroller/webview_javascript_execute_callback.cpp", 82 "webviewcontroller/webview_javascript_result_callback.cpp", 83 ] 84 85 external_deps = [ 86 "ability_base:extractortool", 87 "ability_runtime:app_context", 88 "bundle_framework:appexecfwk_base", 89 "bundle_framework:appexecfwk_core", 90 "c_utils:utils", 91 "common_event_service:cesfwk_innerkits", 92 "hilog:libhilog", 93 "image_framework:image", 94 "image_framework:image_native", 95 "init:libbegetutil", 96 "ipc:ipc_core", 97 "napi:ace_container_scope", 98 "napi:ace_napi", 99 "protobuf:protobuf_lite", 100 "samgr:samgr_proxy", 101 "window_manager:libwm", 102 ] 103 104 deps = [ 105 "../../../ohos_adapter:nweb_ohos_adapter", 106 "../../../ohos_nweb:libnweb", 107 "../../native:ohweb", 108 "js:js_export", 109 "protos:proto_gen", 110 ] 111 112 relative_install_dir = "module/web" 113 114 part_name = "webview" 115 subsystem_name = "web" 116} 117 118ohos_shared_library("neterrorlist_napi") { 119 if (target_cpu == "arm64") { 120 branch_protector_ret = "pac_ret" 121 branch_protector_frt = "bti" 122 } 123 124 public_configs = [ ":web_public_config" ] 125 126 sources = [ 127 "web_net_error_code/napi_web_net_errorcode.cpp", 128 "web_net_error_code/napi_web_net_errorcode_module.cpp", 129 ] 130 131 external_deps = [ "napi:ace_napi" ] 132 133 relative_install_dir = "module/web" 134 135 part_name = "webview" 136 subsystem_name = "web" 137} 138