ExtensionInstallDialogView: fix scrolling behavior on Views (Win,Linux)
[chromium-blink-merge.git] / chromeos / BUILD.gn
blob9521b8c9674dcb856c02fa124feb611cd502845e
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/allocator.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
8 import("//third_party/protobuf/proto_library.gni")
10 assert(is_chromeos, "Non-ChromeOS builds must not depend on //chromeos")
12 gypi_values = exec_script("//build/gypi_to_gn.py",
13                           [ rebase_path("chromeos.gyp") ],
14                           "scope",
15                           [ "chromeos.gyp" ])
17 component("chromeos") {
18   configs += [ "//net/third_party/nss/ssl:ssl_config" ]
19   public_deps = [
20     "//dbus",
21   ]
22   deps = [
23     "//base",
24     "//base:i18n",
25     "//base:prefs",
26     "//base/third_party/dynamic_annotations",
27     "//chromeos/ime:gencode",
28     "//components/device_event_log",
29     "//components/policy/proto",
30     "//components/onc",
31     "//components/proxy_config",
32     "//crypto",
33     "//crypto:platform",
34     "//google_apis",
35     "//third_party/icu",
36     "//third_party/libxml",
37     "//third_party/protobuf:protobuf_lite",
38     "//url",
39     ":cryptohome_proto",
40     ":power_manager_proto",
41   ]
42   sources = gypi_values.chromeos_sources
43   defines = [ "CHROMEOS_IMPLEMENTATION" ]
46 static_library("test_support") {
47   testonly = true
48   configs += [ "//build/config/linux:dbus" ]
49   deps = [
50     "//testing/gmock",
51     ":chromeos",
52     ":cryptohome_proto",
53     ":power_manager_proto",
54     ":test_support_without_gmock",
55   ]
56   sources = [
57     "attestation/mock_attestation_flow.cc",
58     "attestation/mock_attestation_flow.h",
59     "chromeos_test_utils.cc",
60     "chromeos_test_utils.h",
61     "cryptohome/mock_async_method_caller.cc",
62     "cryptohome/mock_async_method_caller.h",
63     "cryptohome/mock_homedir_methods.cc",
64     "cryptohome/mock_homedir_methods.h",
65     "dbus/mock_cryptohome_client.cc",
66     "dbus/mock_cryptohome_client.h",
67     "dbus/mock_lorgnette_manager_client.cc",
68     "dbus/mock_lorgnette_manager_client.h",
69     "dbus/mock_permission_broker_client.cc",
70     "dbus/mock_permission_broker_client.h",
71     "dbus/mock_session_manager_client.cc",
72     "dbus/mock_session_manager_client.h",
73     "dbus/mock_shill_manager_client.cc",
74     "dbus/mock_shill_manager_client.h",
75     "dbus/mock_shill_profile_client.cc",
76     "dbus/mock_shill_profile_client.h",
77     "dbus/mock_shill_service_client.cc",
78     "dbus/mock_shill_service_client.h",
79     "dbus/services/service_provider_test_helper.cc",
80     "dbus/services/service_provider_test_helper.h",
81     "disks/mock_disk_mount_manager.cc",
82     "disks/mock_disk_mount_manager.h",
83     "login/auth/fake_extended_authenticator.cc",
84     "login/auth/fake_extended_authenticator.h",
85     "login/auth/mock_auth_attempt_state_resolver.cc",
86     "login/auth/mock_auth_attempt_state_resolver.h",
87     "login/auth/mock_auth_status_consumer.cc",
88     "login/auth/mock_auth_status_consumer.h",
89     "login/auth/mock_url_fetchers.cc",
90     "login/auth/mock_url_fetchers.h",
91     "network/fake_network_device_handler.cc",
92     "network/fake_network_device_handler.h",
93     "network/mock_managed_network_configuration_handler.cc",
94     "network/mock_managed_network_configuration_handler.h",
95     "network/onc/onc_test_utils.cc",
96     "network/onc/onc_test_utils.h",
97     "system/fake_statistics_provider.cc",
98     "system/fake_statistics_provider.h",
99   ]
102 static_library("test_support_without_gmock") {
103   testonly = true
104   configs += [ "//build/config/linux:dbus" ]
105   deps = [
106     "//crypto",
107     ":chromeos",
108     ":cryptohome_proto",
109     ":power_manager_proto",
110   ]
111   sources = [
112     "dbus/fake_cros_disks_client.cc",
113     "dbus/fake_cros_disks_client.h",
114     "dbus/fake_power_manager_client.cc",
115     "dbus/fake_power_manager_client.h",
116     "dbus/fake_session_manager_client.cc",
117     "dbus/fake_session_manager_client.h",
118     "dbus/fake_shill_manager_client.cc",
119     "dbus/fake_shill_manager_client.h",
120     "dbus/fake_update_engine_client.cc",
121     "dbus/fake_update_engine_client.h",
122   ]
125 test("chromeos_unittests") {
126   configs += [
127     "//build/config/linux:dbus",
128     "//net/third_party/nss/ssl:ssl_config",
129   ]
130   deps = [
131     "//base:prefs_test_support",
132     "//base/test:run_all_unittests",
133     "//base/test:test_support",
134     "//components/onc",
135     "//components/proxy_config",
136     "//crypto",
137     "//crypto:test_support",
138     "//dbus:test_support",
139     "//google_apis",
140     "//net",
141     "//net:test_support",
142     "//testing/gmock",
143     "//testing/gtest",
144     "//third_party/icu",
145     "//url",
146     ":cryptohome_proto",
147     ":power_manager_proto",
148     ":test_support",
149   ]
150   sources = gypi_values.chromeos_test_sources
151   if (use_allocator != "none") {
152     deps += [ "//base/allocator" ]
153   }
156 proto_library("power_manager_proto") {
157   sources = [
158     "//third_party/cros_system_api/dbus/power_manager/input_event.proto",
159     "//third_party/cros_system_api/dbus/power_manager/peripheral_battery_status.proto",
160     "//third_party/cros_system_api/dbus/power_manager/policy.proto",
161     "//third_party/cros_system_api/dbus/power_manager/power_supply_properties.proto",
162     "//third_party/cros_system_api/dbus/power_manager/suspend.proto",
163   ]
165   proto_out_dir = "chromeos/dbus/power_manager"
168 proto_library("cryptohome_proto") {
169   sources = [
170     "//third_party/cros_system_api/dbus/cryptohome/key.proto",
171     "//third_party/cros_system_api/dbus/cryptohome/rpc.proto",
172   ]
174   proto_out_dir = "chromeos/dbus/cryptohome"
177 proto_library("cryptohome_signkey_proto") {
178   sources = [
179     "//third_party/cros_system_api/dbus/cryptohome/signed_secret.proto",
180   ]
182   proto_out_dir = "chromeos/cryptohome"