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

Unified Diff: ui/login/account_picker/user_pod_template.js

Issue 2007133006: Use svg icon to avoid lazy loading of Polymer elements for user pods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests with regard to the latest changes while tests were disabled 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
« no previous file with comments | « ui/login/account_picker/user_pod_template.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/user_pod_template.js
diff --git a/ui/login/account_picker/user_pod_template.js b/ui/login/account_picker/user_pod_template.js
deleted file mode 100644
index 3a1e6c1c02e4b786b6bad6746a76e28aa56f76d4..0000000000000000000000000000000000000000
--- a/ui/login/account_picker/user_pod_template.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-(function() {
- "use strict";
-
- var RESOURCES_TO_LOAD = [
- 'chrome://resources/polymer/v1_0/iron-icons/iron-icons.html',
- 'chrome://resources/polymer/v1_0/paper-button/paper-button.html'
- ];
- /* const */ var IDLE_TIMEOUT_MS = 200;
-
- window.addEventListener('load', function() {
- // The user pod template gets cloned shortly after the load event to make
- // the actual user pods. It then takes a few update cycles to style these
- // elements. Loading polymer will block the DOM, so we try to load polymer
- // after the user pods have been cloned and styled.
- requestIdleCallback(function() {
- for (var resourceUrl of RESOURCES_TO_LOAD) {
- var link = document.createElement('link');
- link.rel = 'import';
- link.href = resourceUrl;
- document.head.appendChild(link);
- }
- }, { timeout: IDLE_TIMEOUT_MS });
- });
-})();
« no previous file with comments | « ui/login/account_picker/user_pod_template.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698