forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Downloads Web UI: Use HTML Imports Polyfill
Update the chrome://downloads page to use the HTML imports polyfill, and remove the exception for this page to always enable HTML imports when it is disabled in Blink. There are a few additional changes required for this conversion, compared to Print Preview and extensions: (1) Main script needs to be wrapped in HTMLImports.whenReady(), since it is in the main HTML document. (2) Mojo web UI tests need to be updated, as they assume that all dependencies from the imports are ready in browsePreload, which is not correct when using the polyfill. (3) Add a non-bundled HTML file to import the downloads.mojom-lite.js script, so that it does not become a <script> in the main document when optimized. Bug: 925517 Change-Id: I430d9817b20ee83f849847d9978037c5a8d1ac58 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610487 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#659800}
- Loading branch information
rbpotter
authored and
Commit Bot
committed
May 15, 2019
1 parent
6417de7
commit 38eb56f
Showing
13 changed files
with
88 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<link rel="import" href="chrome://resources/html/cr.html"> | ||
<link rel="import" href="chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.html"> | ||
<script src="downloads.mojom-lite.js"></script> | ||
<link rel="import" href="chrome://downloads/downloads.mojom-lite.html"> | ||
<script src="browser_proxy.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<script src="downloads.mojom-lite.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @fileoverview Externs for HTML imports polyfill. */ | ||
|
||
/** @see https://github.com/webcomponents/html-imports */ | ||
var HTMLImports = {}; | ||
|
||
/** @param {!Function} callback */ | ||
HTMLImports.whenReady = function(callback) {}; |