Commit 72188072 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Clean up deprecated sources assignment filter in //device

Remove deprecated_default_sources_assignment_filter and replace
it with explicit is_win, is_mac, etc. sections.

Bug: 1018739
Change-Id: I03160ac3a6ca185583254526647a320aa7173c22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442833Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813696}
parent 5947cec8
...@@ -15,13 +15,6 @@ if (is_mac) { ...@@ -15,13 +15,6 @@ if (is_mac) {
import("//build/config/mac/mac_sdk.gni") import("//build/config/mac/mac_sdk.gni")
} }
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
is_linux_without_udev = (is_linux || is_chromeos) && !use_udev is_linux_without_udev = (is_linux || is_chromeos) && !use_udev
test("device_unittests") { test("device_unittests") {
...@@ -29,25 +22,16 @@ test("device_unittests") { ...@@ -29,25 +22,16 @@ test("device_unittests") {
"base/synchronization/one_writer_seqlock_unittest.cc", "base/synchronization/one_writer_seqlock_unittest.cc",
"bluetooth/adapter_unittest.cc", "bluetooth/adapter_unittest.cc",
"bluetooth/advertisement_unittest.cc", "bluetooth/advertisement_unittest.cc",
"bluetooth/bluetooth_adapter_android_unittest.cc",
"bluetooth/bluetooth_adapter_mac_metrics_unittest.mm",
"bluetooth/bluetooth_adapter_mac_unittest.mm",
"bluetooth/bluetooth_adapter_unittest.cc", "bluetooth/bluetooth_adapter_unittest.cc",
"bluetooth/bluetooth_adapter_win_unittest.cc",
"bluetooth/bluetooth_advertisement_unittest.cc", "bluetooth/bluetooth_advertisement_unittest.cc",
"bluetooth/bluetooth_device_unittest.cc", "bluetooth/bluetooth_device_unittest.cc",
"bluetooth/bluetooth_device_win_unittest.cc",
"bluetooth/bluetooth_discovery_filter_unittest.cc", "bluetooth/bluetooth_discovery_filter_unittest.cc",
"bluetooth/bluetooth_local_gatt_characteristic_unittest.cc", "bluetooth/bluetooth_local_gatt_characteristic_unittest.cc",
"bluetooth/bluetooth_local_gatt_descriptor_unittest.cc", "bluetooth/bluetooth_local_gatt_descriptor_unittest.cc",
"bluetooth/bluetooth_local_gatt_service_unittest.cc", "bluetooth/bluetooth_local_gatt_service_unittest.cc",
"bluetooth/bluetooth_low_energy_advertisement_manager_mac_unittest.mm",
"bluetooth/bluetooth_low_energy_win_unittest.cc",
"bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc", "bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc",
"bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc", "bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc",
"bluetooth/bluetooth_remote_gatt_service_unittest.cc", "bluetooth/bluetooth_remote_gatt_service_unittest.cc",
"bluetooth/bluetooth_service_record_win_unittest.cc",
"bluetooth/bluetooth_task_manager_win_unittest.cc",
"bluetooth/device_unittest.cc", "bluetooth/device_unittest.cc",
"bluetooth/public/cpp/bluetooth_uuid_unittest.cc", "bluetooth/public/cpp/bluetooth_uuid_unittest.cc",
"bluetooth/server_socket_unittest.cc", "bluetooth/server_socket_unittest.cc",
...@@ -57,22 +41,6 @@ test("device_unittests") { ...@@ -57,22 +41,6 @@ test("device_unittests") {
"bluetooth/test/bluetooth_gatt_server_test.h", "bluetooth/test/bluetooth_gatt_server_test.h",
"bluetooth/test/bluetooth_test.cc", "bluetooth/test/bluetooth_test.cc",
"bluetooth/test/bluetooth_test.h", "bluetooth/test/bluetooth_test.h",
"bluetooth/test/bluetooth_test_android.cc",
"bluetooth/test/bluetooth_test_android.h",
"bluetooth/test/bluetooth_test_mac.h",
"bluetooth/test/bluetooth_test_mac.mm",
"bluetooth/test/bluetooth_test_win.cc",
"bluetooth/test/bluetooth_test_win.h",
"bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h",
"bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm",
"bluetooth/test/mock_bluetooth_cbdescriptor_mac.h",
"bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm",
"bluetooth/test/mock_bluetooth_cbperipheral_mac.h",
"bluetooth/test/mock_bluetooth_cbperipheral_mac.mm",
"bluetooth/test/mock_bluetooth_cbservice_mac.h",
"bluetooth/test/mock_bluetooth_cbservice_mac.mm",
"bluetooth/test/mock_bluetooth_central_manager_mac.h",
"bluetooth/test/mock_bluetooth_central_manager_mac.mm",
"bluetooth/test/test_bluetooth_adapter_observer.cc", "bluetooth/test/test_bluetooth_adapter_observer.cc",
"bluetooth/test/test_bluetooth_adapter_observer.h", "bluetooth/test/test_bluetooth_adapter_observer.h",
"bluetooth/test/test_bluetooth_advertisement_observer.cc", "bluetooth/test/test_bluetooth_advertisement_observer.cc",
...@@ -93,6 +61,46 @@ test("device_unittests") { ...@@ -93,6 +61,46 @@ test("device_unittests") {
"test/run_all_unittests.cc", "test/run_all_unittests.cc",
] ]
if (is_mac) {
sources += [
"bluetooth/bluetooth_adapter_mac_metrics_unittest.mm",
"bluetooth/bluetooth_adapter_mac_unittest.mm",
"bluetooth/bluetooth_low_energy_advertisement_manager_mac_unittest.mm",
"bluetooth/test/bluetooth_test_mac.h",
"bluetooth/test/bluetooth_test_mac.mm",
"bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h",
"bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm",
"bluetooth/test/mock_bluetooth_cbdescriptor_mac.h",
"bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm",
"bluetooth/test/mock_bluetooth_cbperipheral_mac.h",
"bluetooth/test/mock_bluetooth_cbperipheral_mac.mm",
"bluetooth/test/mock_bluetooth_cbservice_mac.h",
"bluetooth/test/mock_bluetooth_cbservice_mac.mm",
"bluetooth/test/mock_bluetooth_central_manager_mac.h",
"bluetooth/test/mock_bluetooth_central_manager_mac.mm",
]
}
if (is_android) {
sources += [
"bluetooth/bluetooth_adapter_android_unittest.cc",
"bluetooth/test/bluetooth_test_android.cc",
"bluetooth/test/bluetooth_test_android.h",
]
}
if (is_win) {
sources += [
"bluetooth/bluetooth_adapter_win_unittest.cc",
"bluetooth/bluetooth_device_win_unittest.cc",
"bluetooth/bluetooth_low_energy_win_unittest.cc",
"bluetooth/bluetooth_service_record_win_unittest.cc",
"bluetooth/bluetooth_task_manager_win_unittest.cc",
"bluetooth/test/bluetooth_test_win.cc",
"bluetooth/test/bluetooth_test_win.h",
]
}
if (is_fuchsia) { if (is_fuchsia) {
sources += [ sources += [
"bluetooth/test/bluetooth_test_fuchsia.cc", "bluetooth/test/bluetooth_test_fuchsia.cc",
...@@ -161,11 +169,6 @@ test("device_unittests") { ...@@ -161,11 +169,6 @@ test("device_unittests") {
"fido/get_assertion_task_unittest.cc", "fido/get_assertion_task_unittest.cc",
"fido/hid/fido_hid_message_unittest.cc", "fido/hid/fido_hid_message_unittest.cc",
"fido/large_blob_unittest.cc", "fido/large_blob_unittest.cc",
"fido/mac/browsing_data_deletion_unittest.mm",
"fido/mac/credential_metadata_unittest.cc",
"fido/mac/get_assertion_operation_unittest_mac.mm",
"fido/mac/make_credential_operation_unittest_mac.mm",
"fido/mac/util_unittest.cc",
"fido/make_credential_handler_unittest.cc", "fido/make_credential_handler_unittest.cc",
"fido/make_credential_task_unittest.cc", "fido/make_credential_task_unittest.cc",
"fido/test_callback_receiver_unittest.cc", "fido/test_callback_receiver_unittest.cc",
...@@ -174,12 +177,25 @@ test("device_unittests") { ...@@ -174,12 +177,25 @@ test("device_unittests") {
"fido/u2f_sign_operation_unittest.cc", "fido/u2f_sign_operation_unittest.cc",
"fido/virtual_ctap2_device_unittest.cc", "fido/virtual_ctap2_device_unittest.cc",
"fido/virtual_u2f_device_unittest.cc", "fido/virtual_u2f_device_unittest.cc",
"fido/win/type_conversions_unittest.cc",
] ]
deps += [ "//device/fido:mocks" ] deps += [ "//device/fido:mocks" ]
} }
if (is_mac) {
sources += [
"fido/mac/browsing_data_deletion_unittest.mm",
"fido/mac/credential_metadata_unittest.cc",
"fido/mac/get_assertion_operation_unittest_mac.mm",
"fido/mac/make_credential_operation_unittest_mac.mm",
"fido/mac/util_unittest.cc",
]
}
if (is_win) {
sources += [ "fido/win/type_conversions_unittest.cc" ]
}
# FIDO HID: # FIDO HID:
# Android doesn't compile. # Android doesn't compile.
# Linux, requires udev. # Linux, requires udev.
......
...@@ -5,22 +5,11 @@ ...@@ -5,22 +5,11 @@
import("//build/config/features.gni") import("//build/config/features.gni")
import("//device/vr/buildflags/buildflags.gni") import("//device/vr/buildflags/buildflags.gni")
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
component("base") { component("base") {
output_name = "device_base" output_name = "device_base"
sources = [ sources = [
"device_base_export.h", "device_base_export.h",
"device_info_query_win.cc",
"device_info_query_win.h",
"device_monitor_win.cc",
"device_monitor_win.h",
"features.cc", "features.cc",
"features.h", "features.h",
] ]
...@@ -42,6 +31,12 @@ component("base") { ...@@ -42,6 +31,12 @@ component("base") {
} }
if (is_win) { if (is_win) {
sources += [
"device_info_query_win.cc",
"device_info_query_win.h",
"device_monitor_win.cc",
"device_monitor_win.h",
]
libs = [ "setupapi.lib" ] libs = [ "setupapi.lib" ]
} }
} }
This diff is collapsed.
...@@ -9,13 +9,6 @@ if (is_android) { ...@@ -9,13 +9,6 @@ if (is_android) {
import("//build/config/android/rules.gni") # For generate_jni(). import("//build/config/android/rules.gni") # For generate_jni().
} }
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
component("gamepad") { component("gamepad") {
output_name = "device_gamepad" output_name = "device_gamepad"
...@@ -24,8 +17,6 @@ component("gamepad") { ...@@ -24,8 +17,6 @@ component("gamepad") {
"abstract_haptic_gamepad.h", "abstract_haptic_gamepad.h",
"dualshock4_controller.cc", "dualshock4_controller.cc",
"dualshock4_controller.h", "dualshock4_controller.h",
"game_controller_data_fetcher_mac.h",
"game_controller_data_fetcher_mac.mm",
"gamepad_blocklist.cc", "gamepad_blocklist.cc",
"gamepad_blocklist.h", "gamepad_blocklist.h",
"gamepad_consumer.cc", "gamepad_consumer.cc",
...@@ -34,10 +25,6 @@ component("gamepad") { ...@@ -34,10 +25,6 @@ component("gamepad") {
"gamepad_data_fetcher.h", "gamepad_data_fetcher.h",
"gamepad_data_fetcher_manager.cc", "gamepad_data_fetcher_manager.cc",
"gamepad_data_fetcher_manager.h", "gamepad_data_fetcher_manager.h",
"gamepad_device_linux.cc",
"gamepad_device_linux.h",
"gamepad_device_mac.h",
"gamepad_device_mac.mm",
"gamepad_export.h", "gamepad_export.h",
"gamepad_haptics_manager.cc", "gamepad_haptics_manager.cc",
"gamepad_haptics_manager.h", "gamepad_haptics_manager.h",
...@@ -48,12 +35,6 @@ component("gamepad") { ...@@ -48,12 +35,6 @@ component("gamepad") {
"gamepad_pad_state_provider.cc", "gamepad_pad_state_provider.cc",
"gamepad_pad_state_provider.h", "gamepad_pad_state_provider.h",
"gamepad_platform_data_fetcher.h", "gamepad_platform_data_fetcher.h",
"gamepad_platform_data_fetcher_android.cc",
"gamepad_platform_data_fetcher_android.h",
"gamepad_platform_data_fetcher_linux.cc",
"gamepad_platform_data_fetcher_linux.h",
"gamepad_platform_data_fetcher_mac.h",
"gamepad_platform_data_fetcher_mac.mm",
"gamepad_provider.cc", "gamepad_provider.cc",
"gamepad_provider.h", "gamepad_provider.h",
"gamepad_service.cc", "gamepad_service.cc",
...@@ -62,42 +43,15 @@ component("gamepad") { ...@@ -62,42 +43,15 @@ component("gamepad") {
"gamepad_shared_buffer.h", "gamepad_shared_buffer.h",
"gamepad_standard_mappings.cc", "gamepad_standard_mappings.cc",
"gamepad_standard_mappings.h", "gamepad_standard_mappings.h",
"gamepad_standard_mappings_linux.cc",
"gamepad_standard_mappings_mac.mm",
"gamepad_standard_mappings_win.cc",
"gamepad_uma.cc", "gamepad_uma.cc",
"gamepad_uma.h", "gamepad_uma.h",
"gamepad_user_gesture.cc", "gamepad_user_gesture.cc",
"gamepad_user_gesture.h", "gamepad_user_gesture.h",
"hid_dll_functions_win.cc",
"hid_dll_functions_win.h",
"hid_haptic_gamepad.cc", "hid_haptic_gamepad.cc",
"hid_haptic_gamepad.h", "hid_haptic_gamepad.h",
"hid_writer.h", "hid_writer.h",
"hid_writer_linux.cc",
"hid_writer_linux.h",
"hid_writer_mac.cc",
"hid_writer_mac.h",
"hid_writer_win.cc",
"hid_writer_win.h",
"raw_input_data_fetcher_win.cc",
"raw_input_data_fetcher_win.h",
"raw_input_gamepad_device_win.cc",
"raw_input_gamepad_device_win.h",
"udev_gamepad_linux.cc",
"udev_gamepad_linux.h",
"wgi_data_fetcher_win.cc",
"wgi_data_fetcher_win.h",
"xbox_controller_mac.h",
"xbox_controller_mac.mm",
"xbox_data_fetcher_mac.cc",
"xbox_data_fetcher_mac.h",
"xbox_hid_controller.cc", "xbox_hid_controller.cc",
"xbox_hid_controller.h", "xbox_hid_controller.h",
"xinput_data_fetcher_win.cc",
"xinput_data_fetcher_win.h",
"xinput_haptic_gamepad_win.cc",
"xinput_haptic_gamepad_win.h",
] ]
deps = [ deps = [
...@@ -116,23 +70,51 @@ component("gamepad") { ...@@ -116,23 +70,51 @@ component("gamepad") {
defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ] defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ]
if (is_win) { if (is_win) {
sources += [
"gamepad_standard_mappings_win.cc",
"hid_dll_functions_win.cc",
"hid_dll_functions_win.h",
"hid_writer_win.cc",
"hid_writer_win.h",
"raw_input_data_fetcher_win.cc",
"raw_input_data_fetcher_win.h",
"raw_input_gamepad_device_win.cc",
"raw_input_gamepad_device_win.h",
"wgi_data_fetcher_win.cc",
"wgi_data_fetcher_win.h",
"xinput_data_fetcher_win.cc",
"xinput_data_fetcher_win.h",
"xinput_haptic_gamepad_win.cc",
"xinput_haptic_gamepad_win.h",
]
cflags = cflags =
[ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit). [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit).
} }
if (is_linux || is_chromeos) { if (is_linux || is_chromeos) {
sources += [
"gamepad_standard_mappings_linux.cc",
"hid_writer_linux.cc",
"hid_writer_linux.h",
]
if (use_udev) { if (use_udev) {
deps += [ "//device/udev_linux" ] sources += [
} else {
sources -= [
"gamepad_device_linux.cc", "gamepad_device_linux.cc",
"gamepad_device_linux.h",
"gamepad_platform_data_fetcher_linux.cc", "gamepad_platform_data_fetcher_linux.cc",
"gamepad_platform_data_fetcher_linux.h",
"udev_gamepad_linux.cc", "udev_gamepad_linux.cc",
"udev_gamepad_linux.h",
] ]
deps += [ "//device/udev_linux" ]
} }
} }
if (is_android) { if (is_android) {
sources += [
"gamepad_platform_data_fetcher_android.cc",
"gamepad_platform_data_fetcher_android.h",
]
deps += [ ":jni_headers" ] deps += [ ":jni_headers" ]
} }
...@@ -146,6 +128,21 @@ component("gamepad") { ...@@ -146,6 +128,21 @@ component("gamepad") {
} }
if (is_mac) { if (is_mac) {
sources += [
"game_controller_data_fetcher_mac.h",
"game_controller_data_fetcher_mac.mm",
"gamepad_device_mac.h",
"gamepad_device_mac.mm",
"gamepad_platform_data_fetcher_mac.h",
"gamepad_platform_data_fetcher_mac.mm",
"gamepad_standard_mappings_mac.mm",
"hid_writer_mac.cc",
"hid_writer_mac.h",
"xbox_controller_mac.h",
"xbox_controller_mac.mm",
"xbox_data_fetcher_mac.cc",
"xbox_data_fetcher_mac.h",
]
frameworks = [ frameworks = [
"CoreFoundation.framework", "CoreFoundation.framework",
"Foundation.framework", "Foundation.framework",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment