Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / chromeos / BUILD.gn
blob900f3e0dbd7f7704c2df6450b6e596ecdd6858e9
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.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//chrome/chrome_tests.gni")
8 import("//media/media_options.gni")
9 import("//third_party/protobuf/proto_library.gni")
11 gypi_values = exec_script("//build/gypi_to_gn.py",
12                           [ rebase_path("../../chrome_browser_chromeos.gypi") ],
13                           "scope",
14                           [ "../../chrome_browser_chromeos.gypi" ])
16 source_set("chromeos") {
17   assert(enable_extensions, "ChromeOS Chrome has to be built with extensions")
19   configs += [
20     "//build/config/compiler:wexit_time_destructors",
21     "//build/config/linux:fontconfig",
22   ]
24   public_deps = [
25     "//ash/resources",
26     "//ash/strings",
27     "//chrome/app/resources:platform_locale_settings",
28     "//chrome/app/theme:theme_resources",
29     "//chrome:extra_resources",
30     "//chrome:resources",
31     "//chrome:strings",
32     "//components/wallpaper",
33     "//content/app/resources",
34     "//ui/chromeos/resources",
35     "//ui/chromeos/strings",
36     "//ui/resources",
37     "//ui/strings",
38   ]
40   deps = [
41     # TODO(tbarzic): Cleanup this list.
42     ":attestation_proto",
43     ":device_policy_proto",
44     "//ash",
45     "//ash:ash_with_content",
46     "//components/drive",
47     "//components/login",
48     "//components/session_manager/core",
49     "//components/user_manager",
50     "//components/wifi_sync",
51     "//chrome/browser/devtools",
52     "//chrome/browser/extensions",
53     "//chrome/browser/net:encrypted_cert_logger_proto",
54     "//chrome/browser/safe_browsing:chunk_proto",
55     "//chrome/browser/safe_browsing:metadata_proto",
56     "//chrome/browser/safe_browsing:report_proto",
57     "//chrome/browser/ssl:cert_logger_proto",
58     "//chrome/common",
59     "//chrome/common/extensions/api",
60     "//chrome/common/extensions/api:api_registration",
61     "//chrome/common/net",
62     "//chrome/installer/util",
63     "//chromeos",
64     "//chromeos/ime:gencode",
65     "//chromeos:cryptohome_proto",
66     "//chromeos:cryptohome_signkey_proto",
67     "//chromeos:power_manager_proto",
68     "//components/onc",
69     "//components/ownership",
70     "//components/pairing",
71     "//components/policy",
72     "//components/proxy_config",
74     # This depends directly on the variations target, rather than just
75     # transitively via the common target because the proto sources need to
76     # be generated before code in this target can start building.
77     "//components/strings",
78     "//components/variations",
79     "//content/public/browser",
80     "//content/public/common",
81     "//crypto",
82     "//dbus",
83     "//device/bluetooth",
84     "//device/hid",
85     "//media",
86     "//media/mojo/interfaces",
87     "//net",
88     "//ppapi/proxy:ipc",  # For PpapiMsg_LoadPlugin
90     # TODO: care about enable_basic_printing and enable_print_preview.
91     "//printing",
92     "//skia",
93     "//storage/browser",
94     "//storage/common",
95     "//sync",
96     "//third_party/adobe/flash:flapper_version_h",
97     "//third_party/cacheinvalidation",
98     "//third_party/icu",
99     "//third_party/leveldatabase",
100     "//third_party/libevent",
101     "//third_party/libjingle",
102     "//third_party/libusb",
103     "//third_party/protobuf:protobuf_lite",
104     "//third_party/protobuf:protoc($host_toolchain)",
105     "//third_party/re2",
106     "//third_party/zlib",
107     "//ui/app_list",
108     "//ui/aura",
109     "//ui/base",
110     "//ui/chromeos:ui_chromeos",
111     "//ui/compositor",
112     "//ui/display",
113     "//ui/events/devices",
114     "//ui/events/platform",
115     "//ui/events:dom_keycode_converter",
116     "//ui/file_manager",
117     "//ui/message_center",
118     "//ui/surface",
119     "//ui/views",
120     "//ui/views/controls/webview",
121     "//ui/web_dialogs",
122     "//url",
123     "//v8",
124   ]
126   defines = []
128   sources = rebase_path(gypi_values.browser_chromeos_sources, ".", "//chrome") +
129             rebase_path(gypi_values.browser_chromeos_extension_sources,
130                         ".",
131                         "//chrome")
132   if (use_x11) {
133     configs += [ "//build/config/linux:x11" ]
134     deps += [ "//ui/events/devices" ]
135     sources -= [
136       "system/input_device_settings_impl_ozone.cc",
137       "system_logs/touch_log_source_ozone.cc",
138     ]
139   } else {
140     assert(use_ozone, "Either use_x11 or use_ozone has to be specified.")
141     deps += [ "//ui/ozone" ]
142     sources -= [
143       "device_uma.cc",
144       "device_uma.h",
145       "events/system_key_event_listener.cc",
146       "events/system_key_event_listener.h",
147       "events/xinput_hierarchy_changed_event_listener.cc",
148       "events/xinput_hierarchy_changed_event_listener.h",
149       "system/input_device_settings_impl_x11.cc",
150       "system_logs/touch_log_source_x11.cc",
151     ]
152   }
154   if (use_cras) {
155     defines += [ "USE_CRAS" ]
156   }
158   if (ui_compositor_image_transport) {
159     deps += [ "//ui/gl" ]
160   }
163 source_set("unit_tests") {
164   testonly = true
166   sources = rebase_path(
167           chrome_tests_unit_gypi_values.chrome_unit_tests_chromeos_sources,
168           ".",
169           "//chrome")
171   public_deps = [
172     ":chromeos",
173   ]
174   deps = [
175     ":attestation_proto",
176     ":device_policy_proto",
177     "//ash/resources",
178     "//components/drive",
179     "//components/policy",
180     "//components/invalidation/public",
181     "//components/resources",
182     "//crypto:platform",
183     "//dbus",
184     "//skia",
185     "//sync",
186     "//testing/gmock",
187     "//testing/gtest",
188     "//third_party/leveldatabase",
189     "//third_party/mojo/src/mojo/public/cpp/system:system",
190     "//ui/chromeos/resources",
191   ]
194 proto_library("device_policy_proto") {
195   sources = [
196     "policy/proto/chrome_device_policy.proto",
197     "policy/proto/install_attributes.proto",
198   ]
201 proto_library("attestation_proto") {
202   sources = [
203     "attestation/attestation_key_payload.proto",
204     "attestation/attestation_signed_data.proto",
205   ]