Adding instrumentation to locate the source of jankiness
[chromium-blink-merge.git] / chrome / browser / chromeos / BUILD.gn
blob7413de7b8051a25559bfc1df9094bc1cf89aed04
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("//components/nacl/nacl_defines.gni")
8 import("//media/media_options.gni")
9 import("//third_party/protobuf/proto_library.gni")
11 gypi_values = exec_script(
12     "//build/gypi_to_gn.py",
13     [ rebase_path("../../chrome_browser_chromeos.gypi") ],
14     "scope",
15     [ "chrome_browser_chromeos.gypi" ])
17 source_set("chromeos") {
18   assert(enable_extensions, "ChromeOS Chrome has to be built with extensions")
20   configs += [
21     "//build/config/compiler:wexit_time_destructors",
22     "//build/config/linux:fontconfig",
23   ]
25   public_deps = [
26     "//ash/resources",
27     "//ash/strings",
28     "//chrome/app/resources:platform_locale_settings",
29     "//chrome/app/theme:theme_resources",
30     "//chrome:extra_resources",
31     "//chrome:resources",
32     "//chrome:strings",
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     "//ash",
43     "//ash:ash_with_content",
44     "//breakpad:client",
45     "//components/session_manager/core",
46     "//components/user_manager",
47     "//chrome/browser/devtools",
48     "//chrome/browser/extensions",
49     "//chrome/browser/history:in_memory_url_index_cache_proto",
50     "//chrome/browser/net:cert_logger_proto",
51     "//chrome/browser/safe_browsing:chunk_proto",
52     "//chrome/browser/safe_browsing:metadata_proto",
53     "//chrome/browser/safe_browsing:report_proto",
54     "//chrome/common",
55     "//chrome/common/extensions/api",
56     "//chrome/common/extensions/api:api_registration",
57     "//chrome/common/net",
58     "//chrome/installer/util",
59     "//chromeos",
60     "//chromeos/ime:gencode",
61     "//chromeos:cryptohome_proto",
62     "//chromeos:cryptohome_signkey_proto",
63     "//chromeos:power_manager_proto",
64     "//components/onc",
65     "//components/ownership",
66     "//components/pairing",
67     "//components/policy",
68     # This depends directly on the variations target, rather than just
69     # transitively via the common target because the proto sources need to
70     # be generated before code in this target can start building.
71     "//components/strings",
72     "//components/variations",
73     "//content/public/browser",
74     "//content/public/common",
75     "//crypto",
76     "//dbus",
77     "//device/bluetooth",
78     "//device/hid",
79     "//media",
80     "//net",
81     "//ppapi:ppapi_ipc",  # For PpapiMsg_LoadPlugin
82     "//printing", # TODO: care about enable_printing
83     "//skia",
84     "//storage/browser",
85     "//storage/common",
86     "//sync",
87     "//third_party/adobe/flash:flapper_version_h",
88     "//third_party/cacheinvalidation",
89     "//third_party/expat",
90     "//third_party/hunspell",
91     "//third_party/icu",
92     "//third_party/leveldatabase",
93     "//third_party/libevent",
94     "//third_party/libjingle",
95     "//third_party/libusb",
96     "//third_party/libxml",
97     "//third_party/npapi",
98     "//third_party/protobuf:protobuf_lite",
99     "//third_party/protobuf:protoc($host_toolchain)",
100     "//third_party/re2",
101     "//third_party/zlib",
102     "//ui/app_list",
103     "//ui/aura",
104     "//ui/base",
105     "//ui/chromeos:ui_chromeos",
106     "//ui/compositor",
107     "//ui/display",
108     "//ui/events/platform",
109     "//ui/events:dom4_keycode_converter",
110     "//ui/file_manager",
111     "//ui/message_center",
112     "//ui/surface",
113     "//ui/views",
114     "//ui/views/controls/webview",
115     "//ui/web_dialogs",
116     "//url",
117     "//v8",
118     ":attestation_proto",
119     ":device_policy_proto",
120     ":drive_proto",
121   ]
123   defines = nacl_defines
125   sources = rebase_path(gypi_values.browser_chromeos_sources,
126                         ".", "//chrome") +
127             rebase_path(gypi_values.browser_chromeos_extension_sources,
128                         ".", "//chrome")
129   if (use_athena) {
130     defines += ["USE_ATHENA=1"]
131   }
133   if (use_x11) {
134     configs += [ "//build/config/linux:x11" ]
135   } else {
136     assert(use_ozone, "Either use_x11 or use_ozone has to be specified.")
137     deps += [ "//ui/ozone" ]
138     sources -= [
139       "device_uma.cc",
140       "device_uma.h",
141       "events/system_key_event_listener.cc",
142       "events/system_key_event_listener.h",
143       "events/xinput_hierarchy_changed_event_listener.cc",
144       "events/xinput_hierarchy_changed_event_listener.h",
145     ]
146   }
148   if (use_cras) {
149     defines += [ "USE_CRAS" ]
150   }
152   if (ui_compositor_image_transport) {
153     deps += [ "//ui/gl" ]
154   }
157 proto_library("drive_proto") {
158   sources = [ "drive/drive.proto" ]
161 proto_library("device_policy_proto") {
162   sources = [
163     "policy/proto/chrome_device_policy.proto",
164     "policy/proto/install_attributes.proto",
165   ]
168 proto_library("attestation_proto") {
169   sources = [
170     "attestation/attestation_key_payload.proto",
171     "attestation/attestation_signed_data.proto",
172   ]