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 16SUBSYSTEM_DIR = "//base/web/webview" 17 18config("web_public_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ 21 "$SUBSYSTEM_DIR/interfaces/kits/napi/common", 22 "$SUBSYSTEM_DIR/interfaces/kits/napi/webasynccontroller", 23 "$SUBSYSTEM_DIR/interfaces/kits/napi/webviewcontroller", 24 "$SUBSYSTEM_DIR/interfaces/kits/napi/webcookiemanager", 25 "$SUBSYSTEM_DIR/interfaces/kits/napi/webdatabase", 26 "$SUBSYSTEM_DIR/interfaces/kits/napi/webfunction", 27 "$SUBSYSTEM_DIR/interfaces/kits/napi/webstorage", 28 ] 29} 30 31ohos_shared_library("webview_napi") { 32 include_dirs = [ 33 "//utils/system/safwk/native/include", 34 "//commonlibrary/c_utils/base/include", 35 "//foundation/ability/ability_runtime/interfaces/kits/native/appkit/ability_runtime", 36 "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include/bundlemgr", 37 "$SUBSYSTEM_DIR/ohos_adapter/interfaces", 38 ] 39 public_configs = [ ":web_public_config" ] 40 41 sources = [ 42 "$SUBSYSTEM_DIR/interfaces/kits/napi/common/business_error.cpp", 43 "$SUBSYSTEM_DIR/interfaces/kits/napi/common/napi_parse_utils.cpp", 44 "$SUBSYSTEM_DIR/interfaces/kits/napi/common/napi_webview_native_module.cpp", 45 "$SUBSYSTEM_DIR/interfaces/kits/napi/common/web_errors.cpp", 46 "$SUBSYSTEM_DIR/interfaces/kits/napi/webasynccontroller/napi_web_async_controller.cpp", 47 "$SUBSYSTEM_DIR/interfaces/kits/napi/webcookiemanager/napi_web_cookie_manager.cpp", 48 "$SUBSYSTEM_DIR/interfaces/kits/napi/webdatabase/napi_geolocation_permission.cpp", 49 "$SUBSYSTEM_DIR/interfaces/kits/napi/webdatabase/napi_web_data_base.cpp", 50 "$SUBSYSTEM_DIR/interfaces/kits/napi/webfunction/napi_webview_function.cpp", 51 "$SUBSYSTEM_DIR/interfaces/kits/napi/webfunction/webview_web_inited_callback.cpp", 52 "$SUBSYSTEM_DIR/interfaces/kits/napi/webstorage/napi_web_storage.cpp", 53 "$SUBSYSTEM_DIR/interfaces/kits/napi/webviewcontroller/napi_webview_controller.cpp", 54 "$SUBSYSTEM_DIR/interfaces/kits/napi/webviewcontroller/webview_controller.cpp", 55 "$SUBSYSTEM_DIR/interfaces/kits/napi/webviewcontroller/webview_hasimage_callback.cpp", 56 "$SUBSYSTEM_DIR/interfaces/kits/napi/webviewcontroller/webview_javascript_execute_callback.cpp", 57 "$SUBSYSTEM_DIR/interfaces/kits/napi/webviewcontroller/webview_javascript_result_callback.cpp", 58 ] 59 60 external_deps = [ 61 "ability_runtime:app_context", 62 "hiviewdfx_hilog_native:libhilog", 63 "multimedia_image_framework:image", 64 "multimedia_image_framework:image_native", 65 "napi:ace_napi", 66 "webview:libnweb", 67 ] 68 69 deps = [ "$SUBSYSTEM_DIR/ohos_adapter:nweb_ohos_adapter" ] 70 71 relative_install_dir = "module/web" 72 73 part_name = "webview" 74 subsystem_name = "web" 75} 76