OLD | NEW |
| (Empty) |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 # This file contains Chrome-feature-related build flags (see ui.gni for | |
6 # UI-related ones). These should theoretically be moved to the build files of | |
7 # the features themselves. | |
8 # | |
9 # However, today we have many "bad" dependencies on some of these flags from, | |
10 # e.g. base, so they need to be global to match the GYP configuration. Also, | |
11 # anything that needs a grit define must be in either this file or ui.gni. | |
12 # | |
13 # PLEASE TRY TO AVOID ADDING FLAGS TO THIS FILE in cases where grit isn't | |
14 # required. See the declare_args block of BUILDCONFIG.gn for advice on how | |
15 # to set up feature flags. | |
16 | |
17 import("//build/config/chrome_build.gni") | |
18 if (is_android) { | |
19 import("//build/config/android/config.gni") | |
20 } | |
21 | |
22 declare_args() { | |
23 # Multicast DNS. | |
24 enable_mdns = is_win || is_linux | |
25 | |
26 enable_plugins = !is_android && !is_ios | |
27 | |
28 # Enables Native Client support. | |
29 # TODO(GYP): Get NaCl linking on other platforms. | |
30 # Also, see if we can always get rid of enable_nacl_untrusted and | |
31 # enable_pnacl and always build them if enable_nacl is true. | |
32 # The "is_nacl" part of the condition is needed to ensure that | |
33 # the untrusted code is built properly; arguably it should be | |
34 # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but | |
35 # this will go away when Mac and Win are working and we can just use | |
36 # the commented out logic. | |
37 # Eventually we want this to be: | |
38 # enable_nacl = !is_ios && !is_android | |
39 enable_nacl = (is_linux && !is_chromeos && current_cpu == "x64") || is_nacl | |
40 enable_nacl_untrusted = enable_nacl | |
41 enable_pnacl = enable_nacl_untrusted | |
42 | |
43 # If debug_devtools is set to true, JavaScript files for DevTools are stored | |
44 # as is and loaded from disk. Otherwise, a concatenated file is stored in | |
45 # resources.pak. It is still possible to load JS files from disk by passing | |
46 # --debug-devtools cmdline switch. | |
47 debug_devtools = false | |
48 | |
49 # Enables WebRTC. | |
50 # TODO(GYP) make mac and android work. | |
51 enable_webrtc = !is_ios && !is_mac && !is_android | |
52 | |
53 # Enables the Media Router. | |
54 enable_media_router = !is_ios && !is_android | |
55 | |
56 # Enables proprietary codecs and demuxers; e.g. H264, MOV, AAC, and MP3. | |
57 # Android OS includes support for proprietary codecs regardless of building | |
58 # Chromium or Google Chrome. We also ship Google Chrome and Chromecast with | |
59 # proprietary codecs. | |
60 # TODO(GYP) The GYP build has || chromecast==1 for this: | |
61 proprietary_codecs = is_android || is_chrome_branded | |
62 | |
63 enable_configuration_policy = true | |
64 | |
65 # Enables support for background apps. | |
66 enable_background = !is_ios && !is_android | |
67 | |
68 enable_captive_portal_detection = !is_android && !is_ios | |
69 | |
70 # Enables use of the session service, which is enabled by default. | |
71 # Android stores them separately on the Java side. | |
72 enable_session_service = !is_android && !is_ios | |
73 | |
74 enable_plugin_installation = is_win || is_mac | |
75 | |
76 enable_app_list = !is_ios && !is_android | |
77 | |
78 enable_supervised_users = !is_ios | |
79 | |
80 enable_autofill_dialog = !is_ios | |
81 | |
82 enable_google_now = !is_ios && !is_android | |
83 | |
84 enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos) | |
85 | |
86 enable_remoting = !is_ios && !is_android | |
87 | |
88 # Enable hole punching for the protected video. | |
89 enable_video_hole = is_android | |
90 | |
91 # Enables browser side Content Decryption Modules. Required for embedders | |
92 # (e.g. Android and ChromeCast) that use a browser side CDM. | |
93 enable_browser_cdms = is_android | |
94 | |
95 # Variable safe_browsing is used to control the build time configuration | |
96 # for safe browsing feature. Safe browsing can be compiled in 4 different | |
97 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and | |
98 # reporting features for use with Data Saver on Mobile, and 3 enables | |
99 # extended mobile protection via an external API. When 3 is fully deployed, | |
100 # it will replace 2. | |
101 if (is_android) { | |
102 safe_browsing_mode = 2 | |
103 } else if (is_ios) { | |
104 safe_browsing_mode = 0 | |
105 } else { | |
106 safe_browsing_mode = 1 | |
107 } | |
108 } | |
109 | |
110 # Additional dependent variables ----------------------------------------------- | |
111 | |
112 # Set the version of CLD. | |
113 # 0: Don't specify the version. This option is for the Finch testing. | |
114 # 1: Use only CLD1. | |
115 # 2: Use only CLD2. | |
116 if (is_android) { | |
117 cld_version = 1 | |
118 } else { | |
119 cld_version = 2 | |
120 } | |
121 | |
122 # libudev usage. This currently only affects the content layer. | |
123 use_udev = is_linux | |
124 | |
125 # Enable the spell checker. | |
126 enable_spellcheck = !is_android | |
127 | |
128 # Use the operating system's spellchecker rather than hunspell. | |
129 use_platform_spellchecker = is_android || is_mac | |
130 | |
131 enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win) | |
132 | |
133 # Enable basic printing support and UI. | |
134 enable_basic_printing = !is_chromeos | |
135 | |
136 # Enable printing with print preview. It does not imply | |
137 # enable_basic_printing. It's possible to build Chrome with preview only. | |
138 enable_print_preview = !is_android | |
139 | |
140 # The seccomp-bpf sandbox is only supported on three architectures | |
141 # currently. | |
142 # Do not disable seccomp_bpf anywhere without talking to | |
143 # security@chromium.org! | |
144 use_seccomp_bpf = (is_linux || is_android) && | |
145 (current_cpu == "x86" || current_cpu == "x64" || | |
146 current_cpu == "arm" || current_cpu == "mipsel") | |
147 | |
148 # Enable notifications everywhere except iOS. | |
149 enable_notifications = !is_ios | |
150 | |
151 # TODO(brettw) this should be moved to net and only dependents get this define. | |
152 disable_ftp_support = is_ios | |
153 | |
154 enable_web_speech = !is_android && !is_ios | |
155 | |
156 use_dbus = is_linux | |
157 | |
158 enable_extensions = !is_android && !is_ios | |
159 | |
160 enable_task_manager = !is_ios && !is_android | |
161 | |
162 use_cups = is_desktop_linux || is_mac | |
163 | |
164 enable_themes = !is_android && !is_ios | |
165 | |
166 # TODO(scottmg) remove this when we've fixed printing. | |
167 win_pdf_metafile_for_printing = true | |
168 | |
169 # Whether we are using the rlz library or not. Platforms like Android send | |
170 # rlz codes for searches but do not use the library. | |
171 enable_rlz_support = is_win || is_mac || is_ios || is_chromeos | |
172 enable_rlz = is_chrome_branded && enable_rlz_support | |
173 | |
174 enable_settings_app = enable_app_list && !is_chromeos | |
175 | |
176 enable_service_discovery = enable_mdns || is_mac | |
177 | |
178 enable_wifi_bootstrapping = is_win || is_mac | |
179 | |
180 # Image loader extension is enabled on ChromeOS only. | |
181 enable_image_loader_extension = is_chromeos | |
182 | |
183 # Chrome OS: whether to also build the upcoming version of | |
184 # ChromeVox, which can then be enabled via a command-line switch. | |
185 enable_chromevox_next = false | |
186 | |
187 # Use brlapi from brltty for braille display support. | |
188 use_brlapi = is_chromeos | |
189 | |
190 # Option controlling the use of GConf (the classic GNOME configuration | |
191 # system). | |
192 # TODO(GYP) also require !embedded to enable. | |
193 use_gconf = is_linux && !is_chromeos | |
194 | |
195 # Hangout services is an extension that adds extra features to Hangouts. | |
196 # For official GYP builds, this flag is set, it will likely need to be | |
197 # parameterized in the future for a similar use. | |
198 enable_hangout_services_extension = false | |
199 | |
200 # Whether to back up data before sync. | |
201 enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) | |
202 | |
203 # WebVR support disabled until platform implementations have been added | |
204 enable_webvr = false | |
OLD | NEW |