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