Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3170)

Unified Diff: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js

Issue 1986543002: [Media Router WebUI] Import some Polymer elements after initial load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
index c3af59def0a63d4c78f4df1776562746284d1618..38c2973fe581a9cbab1179d07e4832d3b4ebc372 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
@@ -404,6 +404,17 @@ Polymer({
this.putSearchAtBottom_();
Polymer.RenderStatus.afterNextRender(this, function() {
+ // Import the elements that aren't needed at startup. This reduces
+ // initial load time.
+ this.importHref(this.resolveUrl(
+ 'chrome://resources/polymer/v1_0/neon-animation/' +
+ 'web-animations.html'));
+ this.importHref(this.resolveUrl(
+ '../issue_banner/issue_banner.html'));
+ this.importHref(this.resolveUrl(
+ '../media_router_search_highlighter/' +
+ 'media_router_search_highlighter.html'));
+
// If this is not on a Mac platform, remove the placeholder. See
// onFocus_() for more details. ready() is only called once, so no need
// to check if the placeholder exist before removing.

Powered by Google App Engine
This is Rietveld 408576698