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" ]
43 configs += [ "//build/config/linux:x11" ]
44 deps += [ "//ui/gfx/x" ]
46 "ime/ime_keyboard_ozone.cc",
47 "ime/ime_keyboard_ozone.h",
51 "ime/ime_keyboard_x11.cc",
52 "ime/ime_keyboard_x11.h",
57 static_library("test_support") {
60 "//build/config/linux:dbus",
66 ":power_manager_proto",
67 ":test_support_without_gmock",
70 "attestation/mock_attestation_flow.cc",
71 "attestation/mock_attestation_flow.h",
72 "chromeos_test_utils.cc",
73 "chromeos_test_utils.h",
74 "cryptohome/mock_async_method_caller.cc",
75 "cryptohome/mock_async_method_caller.h",
76 "cryptohome/mock_homedir_methods.cc",
77 "cryptohome/mock_homedir_methods.h",
78 "dbus/mock_cryptohome_client.cc",
79 "dbus/mock_cryptohome_client.h",
80 "dbus/mock_lorgnette_manager_client.cc",
81 "dbus/mock_lorgnette_manager_client.h",
82 "dbus/mock_session_manager_client.cc",
83 "dbus/mock_session_manager_client.h",
84 "dbus/mock_shill_manager_client.cc",
85 "dbus/mock_shill_manager_client.h",
86 "dbus/mock_shill_profile_client.cc",
87 "dbus/mock_shill_profile_client.h",
88 "dbus/mock_shill_service_client.cc",
89 "dbus/mock_shill_service_client.h",
90 "dbus/services/service_provider_test_helper.cc",
91 "dbus/services/service_provider_test_helper.h",
92 "disks/mock_disk_mount_manager.cc",
93 "disks/mock_disk_mount_manager.h",
94 "ime/mock_component_extension_ime_manager_delegate.cc",
95 "ime/mock_component_extension_ime_manager_delegate.h",
96 "login/auth/mock_auth_attempt_state_resolver.cc",
97 "login/auth/mock_auth_attempt_state_resolver.h",
98 "login/auth/mock_auth_status_consumer.cc",
99 "login/auth/mock_auth_status_consumer.h",
100 "login/auth/mock_authenticator.cc",
101 "login/auth/mock_authenticator.h",
102 "login/auth/mock_url_fetchers.cc",
103 "login/auth/mock_url_fetchers.h",
104 "network/fake_network_device_handler.cc",
105 "network/fake_network_device_handler.h",
106 "network/mock_managed_network_configuration_handler.cc",
107 "network/mock_managed_network_configuration_handler.h",
108 "network/onc/onc_test_utils.cc",
109 "network/onc/onc_test_utils.h",
110 "system/fake_statistics_provider.cc",
111 "system/fake_statistics_provider.h",
115 static_library("test_support_without_gmock") {
118 "//build/config/linux:dbus",
124 ":power_manager_proto",
127 "dbus/fake_cros_disks_client.cc",
128 "dbus/fake_cros_disks_client.h",
129 "dbus/fake_power_manager_client.cc",
130 "dbus/fake_power_manager_client.h",
131 "dbus/fake_session_manager_client.cc",
132 "dbus/fake_session_manager_client.h",
133 "dbus/fake_shill_manager_client.cc",
134 "dbus/fake_shill_manager_client.h",
135 "dbus/fake_update_engine_client.cc",
136 "dbus/fake_update_engine_client.h",
137 "ime/fake_input_method_delegate.cc",
138 "ime/fake_input_method_delegate.h",
142 test("chromeos_unittests") {
144 "//build/config/linux:dbus",
145 "//net/third_party/nss/ssl:ssl_config",
148 "//base/test:run_all_unittests",
149 "//base/test:test_support",
151 "//content/test:test_support",
153 "//crypto:test_support",
154 "//dbus:test_support",
157 "//net:test_support",
162 ":power_manager_proto",
165 sources = gypi_values.chromeos_test_sources
166 if (use_allocator != "none") {
167 deps += [ "//base/allocator" ]
170 deps += [ "//ui/gfx/x" ]
174 "ime/ime_keyboard_x11_unittest.cc",
179 proto_library("power_manager_proto") {
181 "//third_party/cros_system_api/dbus/power_manager/input_event.proto",
182 "//third_party/cros_system_api/dbus/power_manager/peripheral_battery_status.proto",
183 "//third_party/cros_system_api/dbus/power_manager/policy.proto",
184 "//third_party/cros_system_api/dbus/power_manager/power_supply_properties.proto",
185 "//third_party/cros_system_api/dbus/power_manager/suspend.proto",
188 proto_out_dir = "chromeos/dbus/power_manager"
191 proto_library("cryptohome_proto") {
193 "//third_party/cros_system_api/dbus/cryptohome/key.proto",
194 "//third_party/cros_system_api/dbus/cryptohome/rpc.proto",
197 proto_out_dir = "chromeos/dbus/cryptohome"
200 proto_library("cryptohome_signkey_proto") {
202 "//third_party/cros_system_api/dbus/cryptohome/signed_secret.proto",
205 proto_out_dir = "chromeos/cryptohome"