Commit 38f826ee authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Force enable V0 APIs for FilesApp extension w Polymer1.

This patch is a preparation for Shadow DOM V0, Custom Element V0 (CEv0) and HTML Imports removal.
Intent to Deprecate and Remove: http://bit.ly/2RGHe3x
Though we soon make these APIs only available for test by turning the json5 feature flag
from status: "stable" to status: "test", there is browser tests/chrome internal components
that use them.

FilesApp finished migration but it was only for w/o Polymer2.
FilesApp w Polymer1 still needs the APIs for it.
Descussion of flagging was done at previous patch among Jochen and Devlin: crrev.com/c/1405955


Bug: 924873, 911943

Change-Id: I0d3038ce5d21c410e1a055b57752d0df62cf62fb
Reviewed-on: https://chromium-review.googlesource.com/c/1496259Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636714}
parent b272a16b
...@@ -900,6 +900,21 @@ void Dispatcher::OnActivateExtension(const std::string& extension_id) { ...@@ -900,6 +900,21 @@ void Dispatcher::OnActivateExtension(const std::string& extension_id) {
blink::WebRuntimeFeatures::EnableCustomElementsV0(true); blink::WebRuntimeFeatures::EnableCustomElementsV0(true);
blink::WebRuntimeFeatures::EnableHTMLImports(true); blink::WebRuntimeFeatures::EnableHTMLImports(true);
} }
// FilesApp support. crbug.com/924873
// For Polymer1, we still need v0 APIs.
// Extensions IDs from src/chrome/browser/chromeos/file_manager/app_id.h.
if (!base::FeatureList::IsEnabled(features::kWebUIPolymer2) &&
(extension_id == "hhaomjibdihmijegdhdafkllkbggdgoj" ||
extension_id == "jcgeabjmjgoblfofpppfkcoakmfobdko" ||
extension_id == "nlkncpkkdoccmpiclbokaimcnedabhhm" ||
extension_id == "cjbfomnbifhcdnihkgipgfcihmgjfhbf" ||
extension_id == "mmfbcljfglbokpmkimbfghdkjmjhdgbg" ||
extension_id == "pmfjbimdmchhbnneeidfognadeopoehp" ||
extension_id == "dmboannefpncccogfdikhmhpmdnddgoe")) {
blink::WebRuntimeFeatures::EnableShadowDOMV0(true);
blink::WebRuntimeFeatures::EnableCustomElementsV0(true);
blink::WebRuntimeFeatures::EnableHTMLImports(true);
}
InitOriginPermissions(extension); InitOriginPermissions(extension);
......
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