Commit 6cf41964 authored by Demetrios Papadopoulos's avatar Demetrios Papadopoulos Committed by Commit Bot

WebUI: Share namespace rewrites across polymer/js_modulizer tools.

This is to avoid specifying the same rewrites over and over again,
during the Polymer 3 migration.

Bug: 1026426
Change-Id: If866cd3e8c5be2d3a2344a20ead7cdaaae3a43ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040431
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738754}
parent 24139de9
......@@ -329,7 +329,6 @@ js_modulizer("modulize_local") {
"test_util.js",
]
namespace_rewrites = [
"cr.ui.FocusRowBehavior|FocusRowBehavior",
"cr.ui.Store|Store",
"MockInteractions.down|down",
"MockInteractions.pressAndReleaseKeyOn|pressAndReleaseKeyOn",
......
......@@ -11,7 +11,6 @@ js_modulizer("modulize") {
]
namespace_rewrites = [
"certificate_manager.CertificatesBrowserProxyImpl|CertificatesBrowserProxyImpl",
"cr.isChromeOS|isChromeOS",
"test_util.eventToPromise|eventToPromise",
"MockInteractions.keyEventOn|keyEventOn",
]
......
......@@ -38,8 +38,6 @@ js_modulizer("modulize") {
"iron_list_focus_test.js",
]
namespace_rewrites = [
"cr.isMac|isMac",
"cr.isWindows|isWindows",
"cr.toastManager.getToastManager|getToastManager",
"MockInteractions.blur|blur",
"MockInteractions.downAndUp|downAndUp",
......@@ -49,7 +47,6 @@ js_modulizer("modulize") {
"MockInteractions.pressAndReleaseKeyOn|pressAndReleaseKeyOn",
"MockInteractions.tap|tap",
"Polymer.Base|Base",
"Polymer.dom.flush|flush",
"test_util.eventToPromise|eventToPromise",
"test_util.flushTasks|flushTasks",
"test_util.isChildVisible|isChildVisible",
......
......@@ -2,17 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
common_namespace_rewrites_polymer = [
"cr.icon.getFavicon|getFavicon",
"cr.ui.FocusOutlineManager|FocusOutlineManager",
"cr.ui.FocusRowBehavior|FocusRowBehavior",
"cr.ui.focusWithoutInk|focusWithoutInk",
"Polymer.IronA11yAnnouncer|IronA11yAnnouncer",
"Polymer.PaperRippleBehavior|PaperRippleBehavior",
"Polymer.RenderStatus.afterNextRender|afterNextRender",
# TODO(dpapad): Add more such rewrites as they get discovered.
]
import("//ui/webui/resources/tools/js_modulizer.gni")
common_auto_imports = [
"third_party/polymer/v1_0/components-chromium/iron-a11y-announcer/iron-a11y-announcer.html|IronA11yAnnouncer",
......@@ -59,7 +49,7 @@ template("polymer_modulizer") {
rebase_path(target_gen_dir, root_build_dir),
]
args += [ "--namespace_rewrites" ] + common_namespace_rewrites_polymer
args += [ "--namespace_rewrites" ] + common_namespace_rewrites
if (defined(invoker.namespace_rewrites)) {
args += invoker.namespace_rewrites
}
......
......@@ -24,10 +24,7 @@ polymer_modulizer("cr_action_menu") {
html_file = "cr_action_menu.html"
html_type = "dom-module"
namespace_rewrites = [
"cr.ui.focusWithoutInk|focusWithoutInk",
"cr.ui.FocusRow|FocusRow",
"cr.isMac|isMac",
"cr.isWindows|isWindows",
"Polymer.dom|dom",
]
auto_imports = [
......
......@@ -40,8 +40,6 @@ polymer_modulizer("cr_toolbar") {
html_type = "dom-module"
auto_imports =
[ "ui/webui/resources/html/polymer.html|afterNextRender,html,Polymer" ]
namespace_rewrites =
[ "Polymer.RenderStatus.afterNextRender|afterNextRender" ]
}
polymer_modulizer("cr_toolbar_search_field") {
......
......@@ -2,11 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO(dpapad): Share these with polymer_modulizer.gni.
common_namespace_rewrites = [
"cr.addSingletonGetter|addSingletonGetter",
"cr.addWebUIListener|addWebUIListener",
"cr.dispatchSimpleEvent|dispatchSimpleEvent",
"cr.icon.getFavicon|getFavicon",
"cr.isAndroid|isAndroid",
"cr.isChromeOS|isChromeOS",
"cr.isIOS|isIOS",
......@@ -16,10 +16,15 @@ common_namespace_rewrites = [
"cr.removeWebUIListener|removeWebUIListener",
"cr.sendWithPromise|sendWithPromise",
"cr.ui.FocusOutlineManager|FocusOutlineManager",
"cr.ui.FocusRowBehavior|FocusRowBehavior",
"cr.ui.focusWithoutInk|focusWithoutInk",
"Polymer.dom.flush|flush",
"Polymer.IronA11yAnnouncer|IronA11yAnnouncer",
"Polymer.PaperRippleBehavior|PaperRippleBehavior",
"Polymer.RenderStatus.afterNextRender|afterNextRender",
"Polymer.RenderStatus.beforeNextRender|beforeNextRender",
# TODO(dpapad): Add more such rewrites as they get discovered.
]
template("js_modulizer") {
......
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