Skip to content

Commit

Permalink
Vulcanize new Material Design downloads UI
Browse files Browse the repository at this point in the history
Vulcanize is a resource combiner written in node.js by the Polymer team
(authors CC'd). https://github.com/Polymer/vulcanize

Using it shaves a bit of time off the new MD downloads load time.

It'd be nice to integrate this into our build tooling so that if any
dependent files are modified, vulcanize + crisper would automagically
run. But this would require every Chrome engineer to have node.js + npm
(?) + vulcanize + crisper (a no go at the moment).

I'm going to propose depending on node.js in our build system soon,
but for now simply checking in the vulcanized + crisped output and
requiring folks that work on it to re-run the script (vulcanize.py)
doesn't sound too horrible.

The new way to open the non-vulcanized version is at:
chrome://downloads/dev.html

BUG=526577
R=michaelpg@chromium.org
TBR=phajdan.jr@chromium.org

Review URL: https://codereview.chromium.org/1378993003 .

Cr-Commit-Position: refs/heads/master@{#352233}
  • Loading branch information
danbeam committed Oct 3, 2015
1 parent 395e4a2 commit 99ce62a
Show file tree
Hide file tree
Showing 11 changed files with 19,291 additions and 8 deletions.
4 changes: 3 additions & 1 deletion chrome/browser/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def _CommonChecks(input_api, output_api):
def _html_css_js_resource(p):
return p.endswith(('.html', '.css', '.js')) and p.startswith(search_dirs)

BLACKLIST = ['chrome/browser/resources/pdf/index.html',
BLACKLIST = ['chrome/browser/resources/md_downloads/crisper.js',
'chrome/browser/resources/md_downloads/vulcanized.html',
'chrome/browser/resources/pdf/index.html',
'chrome/browser/resources/pdf/index.js']
def is_resource(maybe_resource):
return (maybe_resource.LocalPath() not in BLACKLIST and
Expand Down
6 changes: 6 additions & 0 deletions chrome/browser/browser_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<if expr="not is_android">
<structure name="IDR_DOWNLOADS_DOWNLOADS_HTML" file="resources\downloads\downloads.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
<structure name="IDR_MD_DOWNLOADS_DOWNLOADS_HTML" file="resources\md_downloads\downloads.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
<structure name="IDR_MD_DOWNLOADS_VULCANIZED_HTML" file="resources\md_downloads\vulcanized.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
</if>
<if expr="enable_extensions">
<structure name="IDR_EXTENSIONS_HTML" file="resources\extensions\extensions.html" flattenhtml="true" type="chrome_html" />
Expand Down Expand Up @@ -124,8 +125,13 @@
<include name="IDR_DOWNLOADS_MANAGER_JS" file="resources\downloads\manager.js" type="BINDATA" />
<include name="IDR_DOWNLOADS_THROTTLED_ICON_LOADER_HTML" file="resources\md_downloads\throttled_icon_loader.html" type="BINDATA" />
<include name="IDR_DOWNLOADS_THROTTLED_ICON_LOADER_JS" file="resources\md_downloads\throttled_icon_loader.js" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_1X_INCOGNITO_MARKER_PNG" file="resources\md_downloads\1x\incognito_marker.png" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_2X_INCOGNITO_MARKER_PNG" file="resources\md_downloads\2x\incognito_marker.png" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_1X_NO_DOWNLOADS_PNG" file="resources\md_downloads\1x\no_downloads.png" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_2X_NO_DOWNLOADS_PNG" file="resources\md_downloads\2x\no_downloads.png" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML" file="resources\md_downloads\action_service.html" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_ACTION_SERVICE_JS" file="resources\md_downloads\action_service.js" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_CRISPER_JS" file="resources\md_downloads\crisper.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_FOCUS_ROW_HTML" file="resources\md_downloads\focus_row.html" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_FOCUS_ROW_JS" file="resources\md_downloads\focus_row.js" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_ITEM_CSS" file="resources\md_downloads\item.css" type="BINDATA" flattenhtml="true" />
Expand Down
Loading

0 comments on commit 99ce62a

Please sign in to comment.