summaryrefslogtreecommitdiff
path: root/chromium/chrome/common/features.gni
blob: a402cbb259c1380268ef239ac01fde6a85a0052e (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright 2015 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/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
import("//extensions/features/features.gni")
import("//media/media_options.gni")
import("//net/features.gni")
import("//ppapi/features/features.gni")
import("//printing/features/features.gni")
import("//ui/base/ui_features.gni")

# Please keep features in alphabetical order.
declare_args() {
  enable_app_list = is_chromeos

  # Enables support for background apps.
  enable_background = !is_ios && !is_android && !is_chromecast

  # Enable the printing system dialog for platforms that support printing
  # and have a system dialog.
  enable_basic_print_dialog = enable_basic_printing && !is_chromeos

  enable_captive_portal_detection = !is_android && !is_ios && !is_chromecast

  # Google Now is disabled to prepare for its removal.
  # http://crbug.com/539674
  enable_google_now = false

  # Hangout services is an extension that adds extra features to Hangouts.
  # It is enableable separately to facilitate testing.
  enable_hangout_services_extension = is_chrome_branded

  # 'Ok Google' hotwording is disabled by default. Set to true to enable. (This
  # will download a closed-source NaCl module at startup.) Chrome-branded
  # ChromeOS builds have this enabled by default.
  enable_hotwording = is_chrome_branded && is_chromeos

  enable_one_click_signin =
      is_win || is_mac || (is_linux && !is_chromeos && !is_chromecast)

  # Set to true to bundle all the mash related mojo services into chrome.
  # Specify --mash to chrome to have chrome start the mash environment.
  enable_package_mash_services = is_chromeos

  enable_plugin_installation = is_win || is_mac

  enable_service_discovery = enable_mdns || is_mac

  # Enables use of the session service, which is enabled by default.
  # Android stores them separately on the Java side.
  enable_session_service = !is_android && !is_ios && !is_chromecast

  enable_supervised_users = !is_ios && !is_chromecast

  # Enables vr shell UI development on local or remote page.
  enable_vr_shell_ui_dev = false

  # Enable native notifications via XPC services (mac only).
  # TODO(miguelg): remove this.
  enable_xpc_notifications = true

  # Indicates if the build is using PGO.
  pgo_build = chrome_pgo_phase > 0

  # Optimize parts of Chrome's UI written with web technologies (HTML/CSS/JS)
  # for runtime performance purposes. This does more work at compile time for
  # speed benefits at runtime (so we skip in debug builds). TODO(dbeam): rename
  # this flag "optimize_web_uis" because we run more than vulcanize these days.
  use_vulcanize = !is_debug
}

# Use brlapi from brltty for braille display support.
use_brlapi = is_chromeos

_enable_printing = enable_basic_printing || enable_print_preview

# Every grit target in //chrome should apply these defines so that the
# proper build flags can be set.
chrome_grit_defines = [
  "enable_app_list=$enable_app_list",
  "enable_background=$enable_background",
  "enable_extensions=$enable_extensions",
  "enable_google_now=$enable_google_now",
  "enable_hangout_services_extension=$enable_hangout_services_extension",
  "enable_hotwording=$enable_hotwording",
  "enable_plugins=$enable_plugins",
  "enable_print_preview=$enable_print_preview",
  "enable_printing=$_enable_printing",
  "enable_service_discovery=$enable_service_discovery",
  "enable_webrtc=$enable_webrtc",
  "enable_webvr=$enable_webvr",
  "mac_views_browser=$mac_views_browser",
  "safe_browsing_mode=$safe_browsing_mode",
  "use_vulcanize=$use_vulcanize",
]