Commit 5798c6b2 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Clean up deprecated sources assignment filter in //ui/webui

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

Bug: 1018739
Change-Id: I1ef07c4ce3e6747137d79d973bcf84684eb155b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442539
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813100}
parent a58ec46b
......@@ -7,13 +7,6 @@ import("//tools/polymer/polymer.gni")
import("//ui/webui/resources/tools/js_modulizer.gni")
import("../os_cr_elements.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)
js_type_check("closure_compile") {
deps = [
":cr_camera",
......@@ -70,19 +63,20 @@ js_type_check("closure_compile_module") {
}
js_library("png.m") {
# Need to turn off default sources filtering by GN, otherwise |sources| is
# filtered on non-CrOS, because it contains the term "chromeos". This
# js_library() target is needed in non-CrOS builds as well (see
# chrome/browser/resources/settings/people_page:people_page.m)
set_sources_assignment_filter([])
sources = [
"$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/png.m.js",
]
extra_deps = [ ":modulize" ]
}
# TODO(crbug.com/1134204): This target should probably only be defined if
# target_os is "chromos" as it does not include any source files on other
# platforms.
js_library("cr_picture_types.m") {
sources = [ "$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_types.m.js" ]
sources = []
if (is_chromeos) {
sources += [ "$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_types.m.js" ]
}
extra_deps = [ ":modulize" ]
}
......@@ -96,8 +90,14 @@ group("polymer3_elements") {
]
}
# TODO(crbug.com/1134204): This target should probably only be defined if
# target_os is "chromos" as it does not include any source files on other
# platforms.
js_library("cr_picture_pane.m") {
sources = [ "$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_pane.m.js" ]
sources = []
if (is_chromeos) {
sources += [ "$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_pane.m.js" ]
}
deps = [
":cr_camera.m",
":cr_picture_types.m",
......@@ -106,14 +106,26 @@ js_library("cr_picture_pane.m") {
extra_deps = [ ":cr_picture_pane_module" ]
}
# TODO(crbug.com/1134204): This target should probably only be defined if
# target_os is "chromos" as it does not include any source files on other
# platforms.
js_library("cr_camera.m") {
sources = [ "$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_camera.m.js" ]
sources = []
if (is_chromeos) {
sources += [ "$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_camera.m.js" ]
}
deps = [ ":png.m" ]
extra_deps = [ ":cr_camera_module" ]
}
# TODO(crbug.com/1134204): This target should probably only be defined if
# target_os is "chromos" as it does not include any source files on other
# platforms.
js_library("cr_picture_list.m") {
sources = [ "$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_list.m.js" ]
sources = []
if (is_chromeos) {
sources += [ "$root_gen_dir/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_list.m.js" ]
}
deps = [
":cr_picture_types.m",
":png.m",
......
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