Skip to content

Commit 064f23b

Browse files
freshp86Chromium LUCI CQ
authored and
Chromium LUCI CQ
committed
WebUI: Remove several Mojo Lite JS bindings files from non-CrOS builds.
These files are not used anymore, as all client code has been migrated to the newer Mojo JS module bindings. Bug: 1179821 Change-Id: I9f6a5af745c60671cdd17e6f0deca16ea074cb59 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3406569 Reviewed-by: Nico Weber <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Reviewed-by: Ken Rockot <[email protected]> Reviewed-by: Rebekah Potter <[email protected]> Commit-Queue: Demetrios Papadopoulos <[email protected]> Cr-Commit-Position: refs/heads/main@{#962925}
1 parent d609dd7 commit 064f23b

File tree

5 files changed

+95
-70
lines changed

5 files changed

+95
-70
lines changed

chrome/browser/browser_resources.grd

+6-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@
118118

119119
<include name="IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST" file="resources\network_speech_synthesis\manifest.json" type="BINDATA" />
120120

121-
<include name="IDR_ORIGIN_MOJO_JS" file="${root_gen_dir}\url\mojom\origin.mojom-lite.js" use_base_dir="false" type="BINDATA"/>
121+
<if expr="chromeos_ash">
122+
<include name="IDR_ORIGIN_MOJO_JS" file="${root_gen_dir}\url\mojom\origin.mojom-lite.js" use_base_dir="false" type="BINDATA"/>
123+
</if>
122124
<if expr="enable_plugins">
123125
<include name="IDR_PDF_MANIFEST" file="resources\pdf\manifest.json" type="BINDATA" />
124126
</if>
@@ -134,7 +136,9 @@
134136
<if expr="desktop_linux">
135137
<include name="IDR_PLUGIN_DB_JSON" file="resources\plugin_metadata\plugins_linux.json" type="BINDATA" />
136138
</if>
137-
<include name="IDR_URL_MOJOM_LITE_JS" file="${root_gen_dir}\url\mojom\url.mojom-lite.js" use_base_dir="false" type="BINDATA" />
139+
<if expr="chromeos_ash">
140+
<include name="IDR_URL_MOJOM_LITE_JS" file="${root_gen_dir}\url\mojom\url.mojom-lite.js" use_base_dir="false" type="BINDATA" />
141+
</if>
138142
<include name="IDR_USB_ENUMERATION_OPTIONS_MOJOM_WEBUI_JS" file="${root_gen_dir}\mojom-webui\services\device\public\mojom\usb_enumeration_options.mojom-webui.js" use_base_dir="false" type="BINDATA" />
139143
<include name="IDR_USB_DEVICE_MANAGER_CLIENT_MOJOM_WEBUI_JS" file="${root_gen_dir}\mojom-webui\services\device\public\mojom\usb_manager_client.mojom-webui.js" use_base_dir="false" type="BINDATA" />
140144
<include name="IDR_USB_DEVICE_MANAGER_MOJOM_WEBUI_JS" file="${root_gen_dir}\mojom-webui\services\device\public\mojom\usb_manager.mojom-webui.js" use_base_dir="false" type="BINDATA" />

content/browser/webui/shared_resources_data_source.cc

+9-6
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,23 @@ const std::set<int> GetContentResourceIds() {
3737
return std::set<int>{
3838
IDR_GEOMETRY_MOJOM_WEBUI_JS,
3939
IDR_IMAGE_MOJOM_WEBUI_JS,
40-
IDR_ORIGIN_MOJO_HTML,
41-
IDR_ORIGIN_MOJO_JS,
4240
IDR_ORIGIN_MOJO_WEBUI_JS,
4341
IDR_RANGE_MOJOM_WEBUI_JS,
4442
IDR_TOKEN_MOJO_WEBUI_JS,
45-
IDR_UI_WINDOW_OPEN_DISPOSITION_MOJO_JS,
4643
IDR_UI_WINDOW_OPEN_DISPOSITION_MOJO_WEBUI_JS,
44+
IDR_URL_MOJOM_WEBUI_JS,
45+
IDR_VULKAN_INFO_MOJO_JS,
46+
IDR_VULKAN_TYPES_MOJO_JS,
47+
48+
#if BUILDFLAG(IS_CHROMEOS_ASH)
49+
IDR_ORIGIN_MOJO_HTML,
50+
IDR_ORIGIN_MOJO_JS,
51+
IDR_UI_WINDOW_OPEN_DISPOSITION_MOJO_JS,
4752
IDR_UNGUESSABLE_TOKEN_MOJO_HTML,
4853
IDR_UNGUESSABLE_TOKEN_MOJO_JS,
4954
IDR_URL_MOJO_HTML,
5055
IDR_URL_MOJO_JS,
51-
IDR_URL_MOJOM_WEBUI_JS,
52-
IDR_VULKAN_INFO_MOJO_JS,
53-
IDR_VULKAN_TYPES_MOJO_JS,
56+
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
5457
};
5558
}
5659

content/content_resources.grd

+13-7
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,26 @@ Other resources that belong in this file:
2929
<include name="IDR_HISTOGRAMS_INTERNALS_HTML" file="browser/resources/histograms/histograms_internals.html" type="BINDATA" />
3030
<include name="IDR_HISTOGRAMS_INTERNALS_JS" file="browser/resources/histograms/histograms_internals.js" type="BINDATA" />
3131
<include name="IDR_HISTOGRAMS_INTERNALS_CSS" file="browser/resources/histograms/histograms_internals.css" type="BINDATA" />
32-
<include name="IDR_ORIGIN_MOJO_HTML" file="${root_gen_dir}/url/mojom/origin.mojom.html" resource_path="mojo/url/mojom/origin.mojom.html" use_base_dir="false" type="BINDATA" />
33-
<include name="IDR_ORIGIN_MOJO_JS" file="${root_gen_dir}/url/mojom/origin.mojom-lite.js" resource_path="mojo/url/mojom/origin.mojom-lite.js" use_base_dir="false" type="BINDATA" />
32+
<if expr="chromeos_ash">
33+
<include name="IDR_ORIGIN_MOJO_HTML" file="${root_gen_dir}/url/mojom/origin.mojom.html" resource_path="mojo/url/mojom/origin.mojom.html" use_base_dir="false" type="BINDATA" />
34+
<include name="IDR_ORIGIN_MOJO_JS" file="${root_gen_dir}/url/mojom/origin.mojom-lite.js" resource_path="mojo/url/mojom/origin.mojom-lite.js" use_base_dir="false" type="BINDATA" />
35+
</if>
3436
<include name="IDR_ORIGIN_MOJO_WEBUI_JS" file="${root_gen_dir}/mojom-webui/url/mojom/origin.mojom-webui.js" resource_path="mojo/url/mojom/origin.mojom-webui.js" use_base_dir="false" type="BINDATA" />
3537
<include name="IDR_RANGE_MOJOM_WEBUI_JS" file="${root_gen_dir}/mojom-webui/ui/gfx/range/mojom/range.mojom-webui.js" resource_path="mojo/ui/gfx/range/mojom/range.mojom-webui.js" use_base_dir="false" type="BINDATA" />
3638
<include name="IDR_TOKEN_MOJO_WEBUI_JS" file="${root_gen_dir}/mojom-webui/mojo/public/mojom/base/token.mojom-webui.js" resource_path="mojo/mojo/public/mojom/base/token.mojom-webui.js" use_base_dir="false" type="BINDATA" />
37-
<include name="IDR_UI_WINDOW_OPEN_DISPOSITION_MOJO_JS" file="${root_gen_dir}/ui/base/mojom/window_open_disposition.mojom-lite.js" resource_path="mojo/ui/base/mojom/window_open_disposition.mojom-lite.js" use_base_dir="false" type="BINDATA" />
39+
<if expr="chromeos_ash">
40+
<include name="IDR_UI_WINDOW_OPEN_DISPOSITION_MOJO_JS" file="${root_gen_dir}/ui/base/mojom/window_open_disposition.mojom-lite.js" resource_path="mojo/ui/base/mojom/window_open_disposition.mojom-lite.js" use_base_dir="false" type="BINDATA" />
41+
</if>
3842
<include name="IDR_UI_WINDOW_OPEN_DISPOSITION_MOJO_WEBUI_JS" file="${root_gen_dir}/mojom-webui/ui/base/mojom/window_open_disposition.mojom-webui.js" resource_path="mojo/ui/base/mojom/window_open_disposition.mojom-webui.js" use_base_dir="false" type="BINDATA" />
3943
<include name="IDR_UKM_INTERNALS_HTML" file="../components/ukm/debug/ukm_internals.html" type="BINDATA" />
4044
<include name="IDR_UKM_INTERNALS_JS" file="../components/ukm/debug/ukm_internals.js" preprocess="true" type="BINDATA" />
4145
<include name="IDR_UKM_INTERNALS_CSS" file="../components/ukm/debug/ukm_internals.css" type="BINDATA" />
42-
<include name="IDR_UNGUESSABLE_TOKEN_MOJO_HTML" file="${root_gen_dir}/mojo/public/mojom/base/unguessable_token.mojom.html" resource_path="mojo/mojo/public/mojom/base/unguessable_token.mojom.html" use_base_dir="false" type="BINDATA" />
43-
<include name="IDR_UNGUESSABLE_TOKEN_MOJO_JS" file="${root_gen_dir}/mojo/public/mojom/base/unguessable_token.mojom-lite.js" resource_path="mojo/mojo/public/mojom/base/unguessable_token.mojom-lite.js" use_base_dir="false" type="BINDATA" />
44-
<include name="IDR_URL_MOJO_HTML" file="${root_gen_dir}/url/mojom/url.mojom.html" resource_path="mojo/url/mojom/url.mojom.html" use_base_dir="false" type="BINDATA" />
45-
<include name="IDR_URL_MOJO_JS" file="${root_gen_dir}/url/mojom/url.mojom-lite.js" resource_path="mojo/url/mojom/url.mojom-lite.js" use_base_dir="false" type="BINDATA" />
46+
<if expr="chromeos_ash">
47+
<include name="IDR_UNGUESSABLE_TOKEN_MOJO_HTML" file="${root_gen_dir}/mojo/public/mojom/base/unguessable_token.mojom.html" resource_path="mojo/mojo/public/mojom/base/unguessable_token.mojom.html" use_base_dir="false" type="BINDATA" />
48+
<include name="IDR_UNGUESSABLE_TOKEN_MOJO_JS" file="${root_gen_dir}/mojo/public/mojom/base/unguessable_token.mojom-lite.js" resource_path="mojo/mojo/public/mojom/base/unguessable_token.mojom-lite.js" use_base_dir="false" type="BINDATA" />
49+
<include name="IDR_URL_MOJO_HTML" file="${root_gen_dir}/url/mojom/url.mojom.html" resource_path="mojo/url/mojom/url.mojom.html" use_base_dir="false" type="BINDATA" />
50+
<include name="IDR_URL_MOJO_JS" file="${root_gen_dir}/url/mojom/url.mojom-lite.js" resource_path="mojo/url/mojom/url.mojom-lite.js" use_base_dir="false" type="BINDATA" />
51+
</if>
4652
<include name="IDR_URL_MOJOM_WEBUI_JS" file="${root_gen_dir}/mojom-webui/url/mojom/url.mojom-webui.js" resource_path="mojo/url/mojom/url.mojom-webui.js" use_base_dir="false" type="BINDATA" />
4753
<include name="IDR_VULKAN_INFO_MOJO_JS" file="${root_gen_dir}/mojom-webui/gpu/ipc/common/vulkan_info.mojom-webui.js" resource_path="gpu/ipc/common/vulkan_info.mojom-webui.js" use_base_dir="false" type="BINDATA" />
4854
<include name="IDR_VULKAN_TYPES_MOJO_JS" file="${root_gen_dir}/mojom-webui/gpu/ipc/common/vulkan_types.mojom-webui.js" resource_path="gpu/ipc/common/vulkan_types.mojom-webui.js" use_base_dir="false" type="BINDATA" />

mojo/public/js/mojo_bindings_resources.grd

+46-40
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,18 @@
3535
use_base_dir="false"
3636
resource_path="mojo/mojo/public/js/mojo_bindings_lite.js"
3737
type="BINDATA" />
38-
<include name="IDR_MOJO_BIG_BUFFER_MOJOM_HTML"
39-
file="${root_gen_dir}/mojo/public/mojom/base/big_buffer.mojom.html"
40-
use_base_dir="false"
41-
resource_path="mojo/mojo/public/mojom/base/big_buffer.mojom.html"
42-
type="BINDATA" />
43-
<include name="IDR_MOJO_BIG_BUFFER_MOJOM_LITE_JS"
44-
file="${root_gen_dir}/mojo/public/mojom/base/big_buffer.mojom-lite.js"
45-
use_base_dir="false"
46-
resource_path="mojo/mojo/public/mojom/base/big_buffer.mojom-lite.js"
47-
type="BINDATA" />
38+
<if expr="chromeos_ash">
39+
<include name="IDR_MOJO_BIG_BUFFER_MOJOM_HTML"
40+
file="${root_gen_dir}/mojo/public/mojom/base/big_buffer.mojom.html"
41+
use_base_dir="false"
42+
resource_path="mojo/mojo/public/mojom/base/big_buffer.mojom.html"
43+
type="BINDATA" />
44+
<include name="IDR_MOJO_BIG_BUFFER_MOJOM_LITE_JS"
45+
file="${root_gen_dir}/mojo/public/mojom/base/big_buffer.mojom-lite.js"
46+
use_base_dir="false"
47+
resource_path="mojo/mojo/public/mojom/base/big_buffer.mojom-lite.js"
48+
type="BINDATA" />
49+
</if>
4850
<include name="IDR_MOJO_BIG_BUFFER_MOJOM_WEBUI_JS"
4951
file="${root_gen_dir}/mojom-webui/mojo/public/mojom/base/big_buffer.mojom-webui.js"
5052
use_base_dir="false"
@@ -70,31 +72,45 @@
7072
use_base_dir="false"
7173
resource_path="mojo/mojo/public/mojom/base/safe_base_name.mojom-webui.js"
7274
type="BINDATA" />
73-
<include name="IDR_MOJO_STRING16_MOJOM_HTML"
74-
file="${root_gen_dir}/mojo/public/mojom/base/string16.mojom.html"
75-
use_base_dir="false"
76-
resource_path="mojo/mojo/public/mojom/base/string16.mojom.html"
77-
type="BINDATA" />
78-
<include name="IDR_MOJO_STRING16_MOJOM_LITE_JS"
79-
file="${root_gen_dir}/mojo/public/mojom/base/string16.mojom-lite.js"
80-
use_base_dir="false"
81-
resource_path="mojo/mojo/public/mojom/base/string16.mojom-lite.js"
82-
type="BINDATA" />
75+
<if expr="chromeos_ash">
76+
<include name="IDR_MOJO_STRING16_MOJOM_HTML"
77+
file="${root_gen_dir}/mojo/public/mojom/base/string16.mojom.html"
78+
use_base_dir="false"
79+
resource_path="mojo/mojo/public/mojom/base/string16.mojom.html"
80+
type="BINDATA" />
81+
<include name="IDR_MOJO_STRING16_MOJOM_LITE_JS"
82+
file="${root_gen_dir}/mojo/public/mojom/base/string16.mojom-lite.js"
83+
use_base_dir="false"
84+
resource_path="mojo/mojo/public/mojom/base/string16.mojom-lite.js"
85+
type="BINDATA" />
86+
</if>
8387
<include name="IDR_MOJO_STRING16_MOJOM_WEBUI_JS"
8488
file="${root_gen_dir}/mojom-webui/mojo/public/mojom/base/string16.mojom-webui.js"
8589
use_base_dir="false"
8690
resource_path="mojo/mojo/public/mojom/base/string16.mojom-webui.js"
8791
type="BINDATA" />
88-
<include name="IDR_MOJO_TEXT_DIRECTION_MOJOM_HTML"
89-
file="${root_gen_dir}/mojo/public/mojom/base/text_direction.mojom.html"
90-
use_base_dir="false"
91-
resource_path="mojo/mojo/public/mojom/base/text_direction.mojom.html"
92-
type="BINDATA" />
93-
<include name="IDR_MOJO_TEXT_DIRECTION_MOJOM_LITE_JS"
94-
file="${root_gen_dir}/mojo/public/mojom/base/text_direction.mojom-lite.js"
95-
use_base_dir="false"
96-
resource_path="mojo/mojo/public/mojom/base/text_direction.mojom-lite.js"
97-
type="BINDATA" />
92+
<if expr="chromeos_ash">
93+
<include name="IDR_MOJO_TEXT_DIRECTION_MOJOM_HTML"
94+
file="${root_gen_dir}/mojo/public/mojom/base/text_direction.mojom.html"
95+
use_base_dir="false"
96+
resource_path="mojo/mojo/public/mojom/base/text_direction.mojom.html"
97+
type="BINDATA" />
98+
<include name="IDR_MOJO_TEXT_DIRECTION_MOJOM_LITE_JS"
99+
file="${root_gen_dir}/mojo/public/mojom/base/text_direction.mojom-lite.js"
100+
use_base_dir="false"
101+
resource_path="mojo/mojo/public/mojom/base/text_direction.mojom-lite.js"
102+
type="BINDATA" />
103+
<include name="IDR_MOJO_TIME_MOJOM_HTML"
104+
file="${root_gen_dir}/mojo/public/mojom/base/time.mojom.html"
105+
use_base_dir="false"
106+
resource_path="mojo/mojo/public/mojom/base/time.mojom.html"
107+
type="BINDATA" />
108+
<include name="IDR_MOJO_TIME_MOJOM_LITE_JS"
109+
file="${root_gen_dir}/mojo/public/mojom/base/time.mojom-lite.js"
110+
resource_path="mojo/mojo/public/mojom/base/time.mojom-lite.js"
111+
use_base_dir="false"
112+
type="BINDATA" />
113+
</if>
98114
<include name="IDR_MOJO_TEXT_DIRECTION_MOJOM_WEBUI_JS"
99115
file="${root_gen_dir}/mojom-webui/mojo/public/mojom/base/text_direction.mojom-webui.js"
100116
use_base_dir="false"
@@ -116,16 +132,6 @@
116132
use_base_dir="false"
117133
resource_path="mojo/mojo/public/mojom/base/process_id.mojom-webui.js"
118134
type="BINDATA" />
119-
<include name="IDR_MOJO_TIME_MOJOM_HTML"
120-
file="${root_gen_dir}/mojo/public/mojom/base/time.mojom.html"
121-
use_base_dir="false"
122-
resource_path="mojo/mojo/public/mojom/base/time.mojom.html"
123-
type="BINDATA" />
124-
<include name="IDR_MOJO_TIME_MOJOM_LITE_JS"
125-
file="${root_gen_dir}/mojo/public/mojom/base/time.mojom-lite.js"
126-
resource_path="mojo/mojo/public/mojom/base/time.mojom-lite.js"
127-
use_base_dir="false"
128-
type="BINDATA" />
129135
<include name="IDR_MOJO_TIME_MOJOM_WEBUI_JS"
130136
file="${root_gen_dir}/mojom-webui/mojo/public/mojom/base/time.mojom-webui.js"
131137
use_base_dir="false"

skia/skia_resources.grd

+21-15
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,37 @@
1212
</outputs>
1313
<release seq="1">
1414
<includes>
15-
<include name="IDR_SKIA_BITMAP_MOJOM_LITE_JS"
16-
file="${root_gen_dir}/skia/public/mojom/bitmap.mojom-lite.js"
17-
resource_path="mojo/skia/public/mojom/bitmap.mojom-lite.js"
18-
use_base_dir="false"
19-
type="BINDATA" />
15+
<if expr="chromeos_ash">
16+
<include name="IDR_SKIA_BITMAP_MOJOM_LITE_JS"
17+
file="${root_gen_dir}/skia/public/mojom/bitmap.mojom-lite.js"
18+
resource_path="mojo/skia/public/mojom/bitmap.mojom-lite.js"
19+
use_base_dir="false"
20+
type="BINDATA" />
21+
</if>
2022
<include name="IDR_SKIA_BITMAP_MOJOM_WEBUI_JS"
2123
file="${root_gen_dir}/mojom-webui/skia/public/mojom/bitmap.mojom-webui.js"
2224
resource_path="mojo/skia/public/mojom/bitmap.mojom-webui.js"
2325
use_base_dir="false"
2426
type="BINDATA" />
25-
<include name="IDR_SKIA_IMAGE_INFO_MOJOM_LITE_JS"
26-
file="${root_gen_dir}/skia/public/mojom/image_info.mojom-lite.js"
27-
resource_path="mojo/skia/public/mojom/image_info.mojom-lite.js"
28-
use_base_dir="false"
29-
type="BINDATA" />
27+
<if expr="chromeos_ash">
28+
<include name="IDR_SKIA_IMAGE_INFO_MOJOM_LITE_JS"
29+
file="${root_gen_dir}/skia/public/mojom/image_info.mojom-lite.js"
30+
resource_path="mojo/skia/public/mojom/image_info.mojom-lite.js"
31+
use_base_dir="false"
32+
type="BINDATA" />
33+
</if>
3034
<include name="IDR_SKIA_IMAGE_INFO_MOJOM_WEBUI_JS"
3135
file="${root_gen_dir}/mojom-webui/skia/public/mojom/image_info.mojom-webui.js"
3236
resource_path="mojo/skia/public/mojom/image_info.mojom-webui.js"
3337
use_base_dir="false"
3438
type="BINDATA" />
35-
<include name="IDR_SKIA_SKCOLOR_MOJOM_LITE_JS"
36-
file="${root_gen_dir}/skia/public/mojom/skcolor.mojom-lite.js"
37-
resource_path="mojo/skia/public/mojom/skcolor.mojom-lite.js"
38-
use_base_dir="false"
39-
type="BINDATA" />
39+
<if expr="chromeos_ash">
40+
<include name="IDR_SKIA_SKCOLOR_MOJOM_LITE_JS"
41+
file="${root_gen_dir}/skia/public/mojom/skcolor.mojom-lite.js"
42+
resource_path="mojo/skia/public/mojom/skcolor.mojom-lite.js"
43+
use_base_dir="false"
44+
type="BINDATA" />
45+
</if>
4046
<include name="IDR_SKIA_SKCOLOR_MOJOM_WEBUI_JS"
4147
file="${root_gen_dir}/mojom-webui/skia/public/mojom/skcolor.mojom-webui.js"
4248
resource_path="mojo/skia/public/mojom/skcolor.mojom-webui.js"

0 commit comments

Comments
 (0)