Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / BUILD.gn
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 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")
10
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" ])
16
17 source_set("chromeos") {
18   assert(enable_extensions, "ChromeOS Chrome has to be built with extensions")
19
20   configs += [
21     "//build/config/compiler:wexit_time_destructors",
22     "//build/config/linux:fontconfig",
23   ]
24
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   ]
39
40   deps = [
41     # TODO(tbarzic): Cleanup this list.
42     "//ash",
43     "//ash:ash_with_content",
44     "//breakpad:client",
45     "//components/login",
46     "//components/session_manager/core",
47     "//components/user_manager",
48     "//chrome/browser/devtools",
49     "//chrome/browser/extensions",
50     "//chrome/browser/history:in_memory_url_index_cache_proto",
51     "//chrome/browser/net:cert_logger_proto",
52     "//chrome/browser/safe_browsing:chunk_proto",
53     "//chrome/browser/safe_browsing:metadata_proto",
54     "//chrome/browser/safe_browsing:report_proto",
55     "//chrome/common",
56     "//chrome/common/extensions/api",
57     "//chrome/common/extensions/api:api_registration",
58     "//chrome/common/net",
59     "//chrome/installer/util",
60     "//chromeos",
61     "//chromeos/ime:gencode",
62     "//chromeos:cryptohome_proto",
63     "//chromeos:cryptohome_signkey_proto",
64     "//chromeos:power_manager_proto",
65     "//components/onc",
66     "//components/ownership",
67     "//components/pairing",
68     "//components/policy",
69     # This depends directly on the variations target, rather than just
70     # transitively via the common target because the proto sources need to
71     # be generated before code in this target can start building.
72     "//components/strings",
73     "//components/variations",
74     "//content/public/browser",
75     "//content/public/common",
76     "//crypto",
77     "//dbus",
78     "//device/bluetooth",
79     "//device/hid",
80     "//media",
81     "//net",
82     "//ppapi:ppapi_ipc",  # For PpapiMsg_LoadPlugin
83     # TODO: care about enable_basic_printing and enable_print_preview.
84     "//printing",
85     "//skia",
86     "//storage/browser",
87     "//storage/common",
88     "//sync",
89     "//third_party/adobe/flash:flapper_version_h",
90     "//third_party/cacheinvalidation",
91     "//third_party/expat",
92     "//third_party/hunspell",
93     "//third_party/icu",
94     "//third_party/leveldatabase",
95     "//third_party/libevent",
96     "//third_party/libjingle",
97     "//third_party/libusb",
98     "//third_party/libxml",
99     "//third_party/npapi",
100     "//third_party/protobuf:protobuf_lite",
101     "//third_party/protobuf:protoc($host_toolchain)",
102     "//third_party/re2",
103     "//third_party/zlib",
104     "//ui/app_list",
105     "//ui/aura",
106     "//ui/base",
107     "//ui/chromeos:ui_chromeos",
108     "//ui/compositor",
109     "//ui/display",
110     "//ui/events/platform",
111     "//ui/events:dom4_keycode_converter",
112     "//ui/file_manager",
113     "//ui/message_center",
114     "//ui/surface",
115     "//ui/views",
116     "//ui/views/controls/webview",
117     "//ui/web_dialogs",
118     "//url",
119     "//v8",
120     ":attestation_proto",
121     ":device_policy_proto",
122     ":drive_proto",
123   ]
124
125   defines = nacl_defines
126
127   sources = rebase_path(gypi_values.browser_chromeos_sources,
128                         ".", "//chrome") +
129             rebase_path(gypi_values.browser_chromeos_extension_sources,
130                         ".", "//chrome")
131   if (use_athena) {
132     defines += ["USE_ATHENA=1"]
133   } else {
134     sources += rebase_path(
135         gypi_values.browser_chromeos_non_athena_sources,
136         ".", "//chrome") +
137         rebase_path(gypi_values.browser_chromeos_extension_non_athena_sources,
138                     ".", "//chrome")
139   }
140
141   if (use_x11) {
142     configs += [ "//build/config/linux:x11" ]
143     deps += [ "//ui/events/devices" ]
144   } else {
145     assert(use_ozone, "Either use_x11 or use_ozone has to be specified.")
146     deps += [ "//ui/ozone" ]
147     sources -= [
148       "device_uma.cc",
149       "device_uma.h",
150       "events/system_key_event_listener.cc",
151       "events/system_key_event_listener.h",
152       "events/xinput_hierarchy_changed_event_listener.cc",
153       "events/xinput_hierarchy_changed_event_listener.h",
154     ]
155   }
156
157   if (use_cras) {
158     defines += [ "USE_CRAS" ]
159   }
160
161   if (ui_compositor_image_transport) {
162     deps += [ "//ui/gl" ]
163   }
164 }
165
166 proto_library("drive_proto") {
167   sources = [ "drive/drive.proto" ]
168 }
169
170 proto_library("device_policy_proto") {
171   sources = [
172     "policy/proto/chrome_device_policy.proto",
173     "policy/proto/install_attributes.proto",
174   ]
175 }
176
177 proto_library("attestation_proto") {
178   sources = [
179     "attestation/attestation_key_payload.proto",
180     "attestation/attestation_signed_data.proto",
181   ]
182 }