• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("ohos_adapter_public_interface") {
17  include_dirs = [
18    "//base/web/webview/ohos_adapter/interfaces",
19    "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include/bundlemgr",
20    "//base/global/resource_management/interfaces/inner_api/include",
21    "//foundation/systemabilitymgr/safwk/services/safwk/include",
22  ]
23}
24
25ohos_shared_library("nweb_ohos_adapter") {
26  sources = [
27    "aafwk_adapter/src/aafwk_app_mgr_client_adapter_impl.cpp",
28    "aafwk_adapter/src/aafwk_render_scheduler_impl.cpp",
29    "audio_adapter/src/audio_renderer_adapter_impl.cpp",
30    "audio_adapter/src/audio_system_manager_adapter_impl.cpp",
31    "battery_mgr_adapter/src/battery_mgr_client_adapter_impl.cpp",
32    "datashare_adapter/src/datashare_adapter_impl.cpp",
33    "display_manager_adapter/src/display_manager_adapter_impl.cpp",
34    "distributeddatamgr_adapter/webdatabase/src/ohos_web_data_base_adapter_impl.cpp",
35    "distributeddatamgr_adapter/webdatabase/src/ohos_web_dns_data_base_adapter_impl.cpp",
36    "distributeddatamgr_adapter/webdatabase/src/ohos_web_permission_data_base_adapter_impl.cpp",
37    "inputmethodframework_adapter/src/imf_adapter_impl.cpp",
38    "interfaces/ohos_adapter_helper.cpp",
39    "multimodalinput_adapter/src/mmi_adapter_impl.cpp",
40    "net_connect_adapter/src/net_connect_adapter_impl.cpp",
41    "net_connect_adapter/src/net_connect_callback_impl.cpp",
42    "net_connect_adapter/src/net_connect_utils.cpp",
43    "ohos_init_web_adapter/src/ohos_init_web_adapter_impl.cpp",
44    "pasteboard_adapter/src/pasteboard_client_adapter_impl.cpp",
45    "power_mgr_adapter/src/power_mgr_client_adapter_impl.cpp",
46    "pre_dns_adapter/src/nweb_pre_dns_adapter.cpp",
47    "soc_perf_adapter/src/soc_perf_client_adapter_impl.cpp",
48  ]
49
50  cflags = [
51    "-Wall",
52    "-Werror",
53    "-g3",
54  ]
55
56  include_dirs = [
57    "aafwk_adapter/include",
58    "display_manager_adapter/include",
59    "net_connect_adapter/include",
60    "ohos_init_web_adapter/include",
61    "power_mgr_adapter/include",
62    "battery_mgr_adapter/include",
63    "distributeddatamgr_adapter/webdatabase/include",
64    "pasteboard_adapter/include",
65    "datashare_adapter/include",
66    "audio_adapter/include",
67    "multimodalinput_adapter/include",
68    "soc_perf_adapter/include",
69    "inputmethodframework_adapter/include",
70    "//base/web/webview/ohos_nweb/include",
71    "//third_party/jsoncpp/include",
72    "//third_party/json/include",
73  ]
74
75  public_configs = [ ":ohos_adapter_public_interface" ]
76
77  external_deps = [
78    "ability_base:want",
79    "ability_base:zuri",
80    "ability_runtime:abilitykit_native",
81    "ability_runtime:app_manager",
82    "battery_manager:batterysrv_client",
83    "c_utils:utils",
84    "cellular_data:tel_cellular_data_api",
85    "common_event_service:cesfwk_innerkits",
86    "core_service:tel_core_service_api",
87    "data_share:datashare_common",
88    "data_share:datashare_consumer",
89    "file_api:remote_uri_native",
90    "hiviewdfx_hilog_native:libhilog",
91    "imf:inputmethod_client",
92    "init:libbegetutil",
93    "input:libmmi-client",
94    "ipc:ipc_core",
95    "multimedia_audio_framework:audio_client",
96    "multimedia_audio_framework:audio_renderer",
97    "multimedia_image_framework:image_native",
98    "netmanager_base:net_conn_manager_if",
99    "pasteboard:pasteboard_client",
100    "power_manager:powermgr_client",
101    "relational_store:native_rdb",
102    "samgr:samgr_proxy",
103    "window_manager:libdm",
104  ]
105
106  if (defined(global_parts_info.resourceschedule_soc_perf)) {
107    external_deps += [ "soc_perf:socperf_client" ]
108    defines = [ "NWEB_SOC_PERF" ]
109  }
110
111  deps = [
112    "//foundation/ability/ability_runtime/frameworks/native/appkit:app_context",
113  ]
114
115  part_name = "webview"
116  subsystem_name = "web"
117}
118