Commit 404f2874 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Convert //ui to not depend on set_sources_assignment_filter()

set_sources_assignment_filter() is considered as a mis-feature
of gn (as it makes it difficult to reason about the BUILD.gn
files individually).

Convert BUILD.gn files below //ui to instead use conditional
to include source files only on the platformn where they are
used.

The conversion was done by using a modified version of gn that
display all files filtered by set_sources_assignment_filter()
and updating the BUILD.gn files manually to explicitly add the
source files only on the platform that used them.

This CL was uploaded by git cl split.

Bug: 1018739
Change-Id: I0f1dfb9fafe99d71dd45485d9f822acfaee489a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930897Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718585}
parent 272c36b0
...@@ -9,23 +9,23 @@ if (is_android) { ...@@ -9,23 +9,23 @@ if (is_android) {
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
} }
# Reset sources_assignment_filter for the BUILD.gn file to prevent
# regression during the migration of Chromium away from the feature.
# See build/no_sources_assignment_filter.md for more information.
# TODO(crbug.com/1018739): remove this when migration is done.
set_sources_assignment_filter([])
jumbo_component("devices") { jumbo_component("devices") {
sources = [ sources = [
"device_data_manager.cc", "device_data_manager.cc",
"device_data_manager.h", "device_data_manager.h",
"device_hotplug_event_observer.h", "device_hotplug_event_observer.h",
"device_util_linux.cc",
"device_util_linux.h",
"events_devices_export.h", "events_devices_export.h",
"gamepad_device.cc", "gamepad_device.cc",
"gamepad_device.h", "gamepad_device.h",
"input_device.cc", "input_device.cc",
"input_device.h", "input_device.h",
"input_device_event_observer.h", "input_device_event_observer.h",
"input_device_observer_android.cc",
"input_device_observer_android.h",
"input_device_observer_win.cc",
"input_device_observer_win.h",
"stylus_state.h", "stylus_state.h",
"touch_device_transform.cc", "touch_device_transform.cc",
"touch_device_transform.h", "touch_device_transform.h",
...@@ -33,6 +33,27 @@ jumbo_component("devices") { ...@@ -33,6 +33,27 @@ jumbo_component("devices") {
"touchscreen_device.h", "touchscreen_device.h",
] ]
if (is_linux) {
sources += [
"device_util_linux.cc",
"device_util_linux.h",
]
}
if (is_android) {
sources += [
"input_device_observer_android.cc",
"input_device_observer_android.h",
]
}
if (is_win) {
sources += [
"input_device_observer_win.cc",
"input_device_observer_win.h",
]
}
defines = [ "EVENTS_DEVICES_IMPLEMENTATION" ] defines = [ "EVENTS_DEVICES_IMPLEMENTATION" ]
public_deps = [ public_deps = [
......
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