xref: /base/web/webview/config.gni (revision 0826e83e)
10826e83eSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
20826e83eSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
30826e83eSopenharmony_ci# you may not use this file except in compliance with the License.
40826e83eSopenharmony_ci# You may obtain a copy of the License at
50826e83eSopenharmony_ci#
60826e83eSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
70826e83eSopenharmony_ci#
80826e83eSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
90826e83eSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
100826e83eSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
110826e83eSopenharmony_ci# See the License for the specific language governing permissions and
120826e83eSopenharmony_ci# limitations under the License.
130826e83eSopenharmony_ci
140826e83eSopenharmony_cideclare_args() {
150826e83eSopenharmony_ci  webview_soc_perf_enable = true
160826e83eSopenharmony_ci  webview_audio_enable = true
170826e83eSopenharmony_ci  webview_location_enable = true
180826e83eSopenharmony_ci  webview_media_player_enable = true
190826e83eSopenharmony_ci  webview_camera_enable = true
200826e83eSopenharmony_ci  webview_telephony_enable = true
210826e83eSopenharmony_ci  webview_battery_manager_enable = true
220826e83eSopenharmony_ci  webview_power_manager_enable = true
230826e83eSopenharmony_ci  webview_avcodec_enable = true
240826e83eSopenharmony_ci  webview_print_enable = true
250826e83eSopenharmony_ci  webview_enterprise_device_manager_enable = true
260826e83eSopenharmony_ci  webview_media_avsession_enable = true
270826e83eSopenharmony_ci  webview_sensors_sensor_enable = true
280826e83eSopenharmony_ci  webview_graphic_2d_ext_enable = true
290826e83eSopenharmony_ci  webview_enable_heif_decoder = false
300826e83eSopenharmony_ci
310826e83eSopenharmony_ci  if (defined(global_parts_info) &&
320826e83eSopenharmony_ci      !defined(global_parts_info.resourceschedule_soc_perf)) {
330826e83eSopenharmony_ci    webview_soc_perf_enable = false
340826e83eSopenharmony_ci  }
350826e83eSopenharmony_ci  if (defined(global_parts_info) &&
360826e83eSopenharmony_ci      (!defined(global_parts_info.multimedia_audio_framework) ||
370826e83eSopenharmony_ci       !defined(global_parts_info.multimedia_av_session))) {
380826e83eSopenharmony_ci    webview_audio_enable = false
390826e83eSopenharmony_ci  }
400826e83eSopenharmony_ci  if (defined(global_parts_info) &&
410826e83eSopenharmony_ci      !defined(global_parts_info.location_location)) {
420826e83eSopenharmony_ci    webview_location_enable = false
430826e83eSopenharmony_ci  }
440826e83eSopenharmony_ci  if (defined(global_parts_info) &&
450826e83eSopenharmony_ci      !defined(global_parts_info.multimedia_player_framework)) {
460826e83eSopenharmony_ci    webview_media_player_enable = false
470826e83eSopenharmony_ci  }
480826e83eSopenharmony_ci  if (defined(global_parts_info) &&
490826e83eSopenharmony_ci      !defined(global_parts_info.multimedia_camera_framework)) {
500826e83eSopenharmony_ci    webview_camera_enable = false
510826e83eSopenharmony_ci  }
520826e83eSopenharmony_ci  if (defined(global_parts_info) &&
530826e83eSopenharmony_ci      !defined(global_parts_info.multimedia_av_codec)) {
540826e83eSopenharmony_ci    webview_avcodec_enable = false
550826e83eSopenharmony_ci  }
560826e83eSopenharmony_ci  if (defined(global_parts_info) &&
570826e83eSopenharmony_ci      (!defined(global_parts_info.telephony_cellular_data) ||
580826e83eSopenharmony_ci       !defined(global_parts_info.telephony_core_service))) {
590826e83eSopenharmony_ci    webview_telephony_enable = false
600826e83eSopenharmony_ci  }
610826e83eSopenharmony_ci  if (defined(global_parts_info) &&
620826e83eSopenharmony_ci      !defined(global_parts_info.powermgr_battery_manager)) {
630826e83eSopenharmony_ci    webview_battery_manager_enable = false
640826e83eSopenharmony_ci  }
650826e83eSopenharmony_ci  if (defined(global_parts_info) &&
660826e83eSopenharmony_ci      !defined(global_parts_info.powermgr_power_manager)) {
670826e83eSopenharmony_ci    webview_power_manager_enable = false
680826e83eSopenharmony_ci  }
690826e83eSopenharmony_ci  if (defined(global_parts_info) &&
700826e83eSopenharmony_ci      !defined(global_parts_info.print_print_fwk)) {
710826e83eSopenharmony_ci    webview_print_enable = false
720826e83eSopenharmony_ci  }
730826e83eSopenharmony_ci  if (defined(global_parts_info) &&
740826e83eSopenharmony_ci      !defined(global_parts_info.customization_enterprise_device_management)) {
750826e83eSopenharmony_ci    webview_enterprise_device_manager_enable = false
760826e83eSopenharmony_ci  }
770826e83eSopenharmony_ci  if (defined(global_parts_info) &&
780826e83eSopenharmony_ci      !defined(global_parts_info.multimedia_av_session)) {
790826e83eSopenharmony_ci    webview_media_avsession_enable = false
800826e83eSopenharmony_ci  }
810826e83eSopenharmony_ci  if (defined(global_parts_info) &&
820826e83eSopenharmony_ci      !defined(global_parts_info.sensors_sensor)) {
830826e83eSopenharmony_ci    webview_sensors_sensor_enable = false
840826e83eSopenharmony_ci  }
850826e83eSopenharmony_ci  if (defined(global_parts_info) &&
860826e83eSopenharmony_ci      !defined(global_parts_info.graphic_graphic_2d_ext)) {
870826e83eSopenharmony_ci    webview_graphic_2d_ext_enable = false
880826e83eSopenharmony_ci  }
890826e83eSopenharmony_ci  if (defined(global_parts_info) &&
900826e83eSopenharmony_ci      !defined(global_parts_info.hdf_drivers_interface_display)) {
910826e83eSopenharmony_ci    webview_enable_heif_decoder = false
920826e83eSopenharmony_ci  }
930826e83eSopenharmony_ci}
940826e83eSopenharmony_ci
950826e83eSopenharmony_ciwebview_package_name = "com.ohos.arkwebcore"
960826e83eSopenharmony_ciwebview_hap_path =
970826e83eSopenharmony_ci    "/module_update/ArkWebCore/app/${webview_package_name}/ArkWebCore.hap"
980826e83eSopenharmony_ciwebview_sandbox_path = "/data/storage/el1/bundle/arkwebcore/"
990826e83eSopenharmony_ciwebview_sandbox_hap_path = "${webview_sandbox_path}entry.hap"
1000826e83eSopenharmony_ciwebview_sandbox_lib_path = "${webview_sandbox_path}libs/${target_cpu}"
1010826e83eSopenharmony_ciwebview_sandbox_relative_lib_path = "arkwebcore/libs/${target_cpu}"
1020826e83eSopenharmony_ciwebview_crashpad_handler_so = "libarkweb_crashpad_handler.so"
1030826e83eSopenharmony_ciwebview_engine_so = "libarkweb_engine.so"
1040826e83eSopenharmony_ciwebview_app_hap_path = "/system/app/ArkWeb/ArkWebCore.hap"
1050826e83eSopenharmony_ciwebview_app_hap_path2 = "/system/app/${webview_package_name}/ArkWebCore.hap"
106