Commit f97cdc4c authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Revert "Extensions: use preprocessing for generating rollup input"

This reverts commit a27166e7.

Reason for revert: Suspected many extension test failure: https://ci.chromium.org/p/chromium/builders/ci/Linux%20Tests%20%28dbg%29%281%29/91600

Original change's description:
> Extensions: use preprocessing for generating rollup input
> 
> Bug: 1128583
> Change-Id: If798fc3db54305ccbf2c795c0fae6c332ce34bbf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410352
> Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
> Reviewed-by: dpapad <dpapad@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#807199}

TBR=dpapad@chromium.org,rbpotter@chromium.org

Change-Id: I0ec45eec5cd962f42043eed80e0765f8e01e18c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1128583
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2409689Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807291}
parent 77433715
...@@ -4,85 +4,51 @@ ...@@ -4,85 +4,51 @@
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni") import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/preprocess_grit.gni") import("//tools/grit/grit_rule.gni")
import("//tools/polymer/html_to_js.gni") import("//tools/polymer/html_to_js.gni")
import("../optimize_webui.gni") import("../optimize_webui.gni")
if (optimize_webui) { if (optimize_webui) {
preprocess_folder = "preprocessed" extensions_pak_file = "extensions_resources.pak"
unpak_folder = "extensions_resources.unpak"
optimize_webui("build") { optimize_webui("build") {
host = "extensions" host = "extensions"
input = rebase_path("$target_gen_dir/$preprocess_folder", root_build_dir) input = rebase_path("$target_gen_dir/$unpak_folder", root_build_dir)
js_out_files = [ "extensions.rollup.js" ] js_out_files = [ "extensions.rollup.js" ]
js_module_in_files = [ "extensions.js" ] js_module_in_files = [ "extensions.js" ]
deps = [ deps = [
":preprocess", ":unpak",
":preprocess_generated",
"../../../../ui/webui/resources:preprocess", "../../../../ui/webui/resources:preprocess",
] ]
excludes = [ "chrome://resources/js/cr.m.js" ] excludes = [ "chrome://resources/js/cr.m.js" ]
} }
preprocess_grit("preprocess") { unpak("unpak") {
in_folder = "./" pak_file = extensions_pak_file
out_folder = "$target_gen_dir/$preprocess_folder" out_folder = unpak_folder
in_files = [
"drag_and_drop_handler.js",
"extensions.js",
"item_behavior.js",
"item_util.js",
"keyboard_shortcut_delegate.js",
"navigation_helper.js",
"service.js",
"shortcut_util.js",
]
if (is_chromeos) { deps = [ ":flattened_resources" ]
in_files += [ "kiosk_browser_proxy.js" ]
}
} }
preprocess_grit("preprocess_generated") { grit("flattened_resources") {
deps = [ ":web_components" ] source = "extensions_resources.grd"
in_folder = target_gen_dir
out_folder = "$target_gen_dir/$preprocess_folder" grit_flags = [
in_files = [ "-E",
"checkup.js", "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"code_section.js",
"activity_log/activity_log_history_item.js",
"activity_log/activity_log_history.js",
"activity_log/activity_log.js",
"activity_log/activity_log_stream_item.js",
"activity_log/activity_log_stream.js",
"detail_view.js",
"drop_overlay.js",
"error_page.js",
"host_permissions_toggle_list.js",
"icons.js",
"install_warnings_dialog.js",
"item.js",
"item_list.js",
"keyboard_shortcuts.js",
"load_error.js",
"manager.js",
"options_dialog.js",
"pack_dialog_alert.js",
"pack_dialog.js",
"runtime_host_permissions.js",
"runtime_hosts_dialog.js",
"shared_style.js",
"shared_vars.js",
"shortcut_input.js",
"sidebar.js",
"toggle_row.js",
"toolbar.js",
] ]
if (is_chromeos) { deps = [ ":web_components" ]
in_files += [ "kiosk_dialog.js" ] defines = chrome_grit_defines
} outputs = [
"grit/extensions_resources.h",
"grit/extensions_resources_map.cc",
"grit/extensions_resources_map.h",
extensions_pak_file,
]
output_dir = "$root_gen_dir/chrome/browser/resources/extensions"
} }
} }
......
...@@ -14,133 +14,144 @@ ...@@ -14,133 +14,144 @@
<includes> <includes>
<include name="IDR_EXTENSIONS_CODE_SECTION_JS" <include name="IDR_EXTENSIONS_CODE_SECTION_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/code_section.js" file="${root_gen_dir}/chrome/browser/resources/extensions/code_section.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_JS" <include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log.js" file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_HISTORY_JS" <include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_HISTORY_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log_history.js" file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log_history.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_HISTORY_ITEM_JS" <include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_HISTORY_ITEM_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log_history_item.js" file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log_history_item.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_STREAM_JS" <include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_STREAM_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log_stream.js" file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log_stream.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_STREAM_ITEM_JS" <include name="IDR_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_STREAM_ITEM_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log_stream_item.js" file="${root_gen_dir}/chrome/browser/resources/extensions/activity_log/activity_log_stream_item.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_CHECKUP_JS" <include name="IDR_EXTENSIONS_CHECKUP_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/checkup.js" file="${root_gen_dir}/chrome/browser/resources/extensions/checkup.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_DETAIL_VIEW_JS" <include name="IDR_EXTENSIONS_DETAIL_VIEW_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/detail_view.js" file="${root_gen_dir}/chrome/browser/resources/extensions/detail_view.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_DROP_OVERLAY_JS" <include name="IDR_EXTENSIONS_DROP_OVERLAY_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/drop_overlay.js" file="${root_gen_dir}/chrome/browser/resources/extensions/drop_overlay.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ERROR_PAGE_JS" <include name="IDR_EXTENSIONS_ERROR_PAGE_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/error_page.js" file="${root_gen_dir}/chrome/browser/resources/extensions/error_page.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_KEYBOARD_SHORTCUTS_JS" <include name="IDR_EXTENSIONS_KEYBOARD_SHORTCUTS_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/keyboard_shortcuts.js" file="${root_gen_dir}/chrome/browser/resources/extensions/keyboard_shortcuts.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<if expr="chromeos"> <if expr="chromeos">
<include name="IDR_EXTENSIONS_KIOSK_DIALOG_JS" <include name="IDR_EXTENSIONS_KIOSK_DIALOG_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/kiosk_dialog.js" file="${root_gen_dir}/chrome/browser/resources/extensions/kiosk_dialog.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
</if> </if>
<include name="IDR_EXTENSIONS_MANAGER_JS" <include name="IDR_EXTENSIONS_MANAGER_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/manager.js" file="${root_gen_dir}/chrome/browser/resources/extensions/manager.js"
preprocess="true" use_base_dir="false" type="BINDATA" /> preprocess="true" use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ICONS_JS" <include name="IDR_EXTENSIONS_ICONS_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/icons.js" file="${root_gen_dir}/chrome/browser/resources/extensions/icons.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_INSTALL_WARNINGS_DIALOG_JS" <include name="IDR_EXTENSIONS_INSTALL_WARNINGS_DIALOG_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/install_warnings_dialog.js" file="${root_gen_dir}/chrome/browser/resources/extensions/install_warnings_dialog.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ITEM_JS" <include name="IDR_EXTENSIONS_ITEM_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/item.js" file="${root_gen_dir}/chrome/browser/resources/extensions/item.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_ITEM_LIST_JS" <include name="IDR_EXTENSIONS_ITEM_LIST_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/item_list.js" file="${root_gen_dir}/chrome/browser/resources/extensions/item_list.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_LOAD_ERROR_JS" <include name="IDR_EXTENSIONS_LOAD_ERROR_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/load_error.js" file="${root_gen_dir}/chrome/browser/resources/extensions/load_error.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_HOST_PERMISSIONS_TOGGLE_LIST_JS" <include name="IDR_EXTENSIONS_HOST_PERMISSIONS_TOGGLE_LIST_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/host_permissions_toggle_list.js" file="${root_gen_dir}/chrome/browser/resources/extensions/host_permissions_toggle_list.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_OPTIONS_DIALOG_JS" <include name="IDR_EXTENSIONS_OPTIONS_DIALOG_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/options_dialog.js" file="${root_gen_dir}/chrome/browser/resources/extensions/options_dialog.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_PACK_DIALOG_JS" <include name="IDR_EXTENSIONS_PACK_DIALOG_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/pack_dialog.js" file="${root_gen_dir}/chrome/browser/resources/extensions/pack_dialog.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_PACK_DIALOG_ALERT_JS" <include name="IDR_EXTENSIONS_PACK_DIALOG_ALERT_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/pack_dialog_alert.js" file="${root_gen_dir}/chrome/browser/resources/extensions/pack_dialog_alert.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_RUNTIME_HOST_PERMISSIONS_JS" <include name="IDR_EXTENSIONS_RUNTIME_HOST_PERMISSIONS_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/runtime_host_permissions.js" file="${root_gen_dir}/chrome/browser/resources/extensions/runtime_host_permissions.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_RUNTIME_HOSTS_DIALOG_JS" <include name="IDR_EXTENSIONS_RUNTIME_HOSTS_DIALOG_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/runtime_hosts_dialog.js" file="${root_gen_dir}/chrome/browser/resources/extensions/runtime_hosts_dialog.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_SHARED_STYLE_JS" <include name="IDR_EXTENSIONS_SHARED_STYLE_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/shared_style.js" file="${root_gen_dir}/chrome/browser/resources/extensions/shared_style.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_SHARED_VARS_JS" <include name="IDR_EXTENSIONS_SHARED_VARS_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/shared_vars.js" file="${root_gen_dir}/chrome/browser/resources/extensions/shared_vars.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_SHORTCUT_INPUT_JS" <include name="IDR_EXTENSIONS_SHORTCUT_INPUT_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/shortcut_input.js" file="${root_gen_dir}/chrome/browser/resources/extensions/shortcut_input.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_SIDEBAR_JS" <include name="IDR_EXTENSIONS_SIDEBAR_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/sidebar.js" file="${root_gen_dir}/chrome/browser/resources/extensions/sidebar.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_TOGGLE_ROW_JS" <include name="IDR_EXTENSIONS_TOGGLE_ROW_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/toggle_row.js" file="${root_gen_dir}/chrome/browser/resources/extensions/toggle_row.js"
use_base_dir="false" type="BINDATA" /> use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_TOOLBAR_JS" <include name="IDR_EXTENSIONS_TOOLBAR_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/toolbar.js" file="${root_gen_dir}/chrome/browser/resources/extensions/toolbar.js"
preprocess="true" use_base_dir="false" type="BINDATA" /> preprocess="true" use_base_dir="false" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_CHECKUP_IMAGE" <include name="IDR_EXTENSIONS_CHECKUP_IMAGE"
file="checkup_image.svg" type="BINDATA" /> file="checkup_image.svg" compress="false" type="BINDATA" />
<include name="IDR_EXTENSIONS_CHECKUP_IMAGE_DARK" <include name="IDR_EXTENSIONS_CHECKUP_IMAGE_DARK"
file="checkup_image_dark.svg" type="BINDATA" /> file="checkup_image_dark.svg" compress="false" type="BINDATA" />
</includes> </includes>
<structures> <structures>
<structure name="IDR_EXTENSIONS_ITEM_BEHAVIOR_JS" <structure name="IDR_EXTENSIONS_ITEM_BEHAVIOR_JS"
file="item_behavior.js" file="item_behavior.js"
compress="false"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_EXTENSIONS_EXTENSIONS_HTML" <structure name="IDR_EXTENSIONS_EXTENSIONS_HTML"
file="extensions.html" file="extensions.html"
compress="false"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_EXTENSIONS_DRAG_AND_DROP_HANDLER_JS" <structure name="IDR_EXTENSIONS_DRAG_AND_DROP_HANDLER_JS"
file="drag_and_drop_handler.js" file="drag_and_drop_handler.js"
compress="false"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_EXTENSIONS_EXTENSIONS_JS" <structure name="IDR_EXTENSIONS_EXTENSIONS_JS"
file="extensions.js" file="extensions.js"
preprocess="true"
compress="false"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_EXTENSIONS_KEYBOARD_SHORTCUT_DELEGATE_JS" <structure name="IDR_EXTENSIONS_KEYBOARD_SHORTCUT_DELEGATE_JS"
file="keyboard_shortcut_delegate.js" file="keyboard_shortcut_delegate.js"
compress="false"
type="chrome_html" /> type="chrome_html" />
<if expr="chromeos"> <if expr="chromeos">
<structure name="IDR_EXTENSIONS_KIOSK_BROWSER_PROXY_JS" <structure name="IDR_EXTENSIONS_KIOSK_BROWSER_PROXY_JS"
file="kiosk_browser_proxy.js" file="kiosk_browser_proxy.js"
compress="false"
type="chrome_html" /> type="chrome_html" />
</if> </if>
<structure name="IDR_EXTENSIONS_ITEM_UTIL_JS" <structure name="IDR_EXTENSIONS_ITEM_UTIL_JS"
file="item_util.js" file="item_util.js"
compress="false"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_EXTENSIONS_NAVIGATION_HELPER_JS" <structure name="IDR_EXTENSIONS_NAVIGATION_HELPER_JS"
file="navigation_helper.js" file="navigation_helper.js"
compress="false"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_EXTENSIONS_SERVICE_JS" <structure name="IDR_EXTENSIONS_SERVICE_JS"
file="service.js" file="service.js"
compress="false"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_EXTENSIONS_SHORTCUT_UTIL_JS" <structure name="IDR_EXTENSIONS_SHORTCUT_UTIL_JS"
file="shortcut_util.js" file="shortcut_util.js"
compress="false"
type="chrome_html" /> type="chrome_html" />
</structures> </structures>
</release> </release>
......
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