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("//third_party/protobuf/proto_library.gni")
9 assert(is_chromeos, "Non-ChromeOS builds must not depend on //chromeos")
11 gypi_values = exec_script(
12 "//build/gypi_to_gn.py",
13 [ rebase_path("chromeos.gyp") ],
17 component("chromeos") {
19 "//net/third_party/nss/ssl:ssl_config",
21 public_deps = [ "//dbus" ]
25 "//base/third_party/dynamic_annotations",
26 "//chromeos/ime:gencode",
27 "//components/policy/proto",
31 "//net/third_party/nss/ssl:libssl",
33 "//third_party/libxml",
34 "//third_party/protobuf:protobuf_lite",
38 ":power_manager_proto"
40 sources = gypi_values.chromeos_sources
41 defines = [ "CHROMEOS_IMPLEMENTATION" ]
44 static_library("test_support") {
47 "//build/config/linux:dbus",
53 ":power_manager_proto",
54 ":test_support_without_gmock",
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_session_manager_client.cc",
70 "dbus/mock_session_manager_client.h",
71 "dbus/mock_shill_manager_client.cc",
72 "dbus/mock_shill_manager_client.h",
73 "dbus/mock_shill_profile_client.cc",
74 "dbus/mock_shill_profile_client.h",
75 "dbus/mock_shill_service_client.cc",
76 "dbus/mock_shill_service_client.h",
77 "dbus/services/service_provider_test_helper.cc",
78 "dbus/services/service_provider_test_helper.h",
79 "disks/mock_disk_mount_manager.cc",
80 "disks/mock_disk_mount_manager.h",
81 "login/auth/mock_auth_attempt_state_resolver.cc",
82 "login/auth/mock_auth_attempt_state_resolver.h",
83 "login/auth/mock_auth_status_consumer.cc",
84 "login/auth/mock_auth_status_consumer.h",
85 "login/auth/mock_authenticator.cc",
86 "login/auth/mock_authenticator.h",
87 "login/auth/mock_url_fetchers.cc",
88 "login/auth/mock_url_fetchers.h",
89 "network/fake_network_device_handler.cc",
90 "network/fake_network_device_handler.h",
91 "network/mock_managed_network_configuration_handler.cc",
92 "network/mock_managed_network_configuration_handler.h",
93 "network/onc/onc_test_utils.cc",
94 "network/onc/onc_test_utils.h",
95 "system/fake_statistics_provider.cc",
96 "system/fake_statistics_provider.h",
100 static_library("test_support_without_gmock") {
103 "//build/config/linux:dbus",
109 ":power_manager_proto",
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",
125 test("chromeos_unittests") {
127 "//build/config/linux:dbus",
128 "//net/third_party/nss/ssl:ssl_config",
131 "//base/test:run_all_unittests",
132 "//base/test:test_support",
134 "//content/test:test_support",
136 "//crypto:test_support",
137 "//dbus:test_support",
140 "//net:test_support",
145 ":power_manager_proto",
148 sources = gypi_values.chromeos_test_sources
149 if (use_allocator != "none") {
150 deps += [ "//base/allocator" ]
153 deps += [ "//ui/gfx/x" ]
157 proto_library("power_manager_proto") {
159 "//third_party/cros_system_api/dbus/power_manager/input_event.proto",
160 "//third_party/cros_system_api/dbus/power_manager/peripheral_battery_status.proto",
161 "//third_party/cros_system_api/dbus/power_manager/policy.proto",
162 "//third_party/cros_system_api/dbus/power_manager/power_supply_properties.proto",
163 "//third_party/cros_system_api/dbus/power_manager/suspend.proto",
166 proto_out_dir = "chromeos/dbus/power_manager"
169 proto_library("cryptohome_proto") {
171 "//third_party/cros_system_api/dbus/cryptohome/key.proto",
172 "//third_party/cros_system_api/dbus/cryptohome/rpc.proto",
175 proto_out_dir = "chromeos/dbus/cryptohome"
178 proto_library("cryptohome_signkey_proto") {
180 "//third_party/cros_system_api/dbus/cryptohome/signed_secret.proto",
183 proto_out_dir = "chromeos/cryptohome"