summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/android/modules/chrome_feature_modules.gni
blob: 7912a1598b63ff7250d1dc4c1ef72ddb8f13bb08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/android/config.gni")
import(
    "//chrome/android/features/autofill_assistant/autofill_assistant_module.gni")
import("//chrome/android/features/dev_ui/dev_ui_module.gni")
import("//chrome/android/features/tab_ui/tab_ui_module.gni")
import("//chrome/android/modules/buildflags.gni")
import("//chrome/android/modules/test_dummy/test_dummy_module.gni")
import("//device/vr/buildflags/buildflags.gni")

if (enable_vr) {
  import("//chrome/android/features/vr/vr_module.gni")
}
if (enable_arcore) {
  import("//chrome/android/features/ar/ar_module.gni")
}

# Mapping that controls package IDs assigned to modules. The package IDs have to
# be unique and lower than 0x7f.
# TODO(crbug.com/984158): Autogenerate instead of explicit list.
resource_packages_id_mapping = [
  "ar=0x7e",
  "vr=0x7d",
  "tab_ui=0x7c",
  "autofill_assistant=0x7b",
  "dev_ui=0x7a",
  "test_dummy=0x79",
]

# List of feature module descs for each Chrome flavor. These lists are used to
# autogenerate the relevant module targets and bundles. A feature module desc
# is a GN scope with the following fields:
#   name: Name of feature module.
#   java_deps: Java libraries and resources going into module.
#   android_manifest: AndroidManifest.xml of module.
#   native_deps: (Optional) Native code going into module.
#   native_entrypoints: (Optional) File with list of exposed symbols from native
#     feature module library.
#   proguard_async: (Optional) Whether to proguard the module asynchronously.
#   loadable_modules_32_bit: (Optional) List of additional 32-bit shared
#     library files going into module if the module is executed in 32 bit.
#   loadable_modules_64_bit: (Optional) List of additional 64-bit shared
#     library files going into module if the module is executed in 64 bit.
# Each new module needs to add a desc to one of the lists below.

# Modules shipped in Chrome Modern (Android L+).
chrome_modern_module_descs = [ test_dummy_module_desc ]
if (enable_vr) {
  chrome_modern_module_descs += [ vr_module_desc ]
}
if (dfmify_dev_ui) {
  chrome_modern_module_descs += [ dev_ui_module_desc ]
}

# Modules shipped in Monochrome (Android N+).
monochrome_module_descs = chrome_modern_module_descs
if (enable_arcore) {
  monochrome_module_descs += [ ar_module_desc ]
}
if (!disable_autofill_assistant_dfm) {
  monochrome_module_descs += [ autofill_assistant_module_desc ]
}
if (!disable_tab_ui_dfm) {
  monochrome_module_descs += [ tab_ui_module_desc ]
}

# Modules shipped in Trichrome (Android Q+).
trichrome_module_descs = monochrome_module_descs