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

Side by Side Diff: chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js

Issue 2628623002: Preload Polymer when old options page is idle (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * QuickUnlockConfigureOverlay class 10 * QuickUnlockConfigureOverlay class
(...skipping 12 matching lines...) Expand all
23 23
24 QuickUnlockConfigureOverlay.prototype = { 24 QuickUnlockConfigureOverlay.prototype = {
25 __proto__: Page.prototype, 25 __proto__: Page.prototype,
26 26
27 /** @override */ 27 /** @override */
28 initializePage: function() { 28 initializePage: function() {
29 Page.prototype.initializePage.call(this); 29 Page.prototype.initializePage.call(this);
30 $('screen-lock-done').onclick = function() { 30 $('screen-lock-done').onclick = function() {
31 QuickUnlockConfigureOverlay.dismiss(); 31 QuickUnlockConfigureOverlay.dismiss();
32 }; 32 };
33 requestIdleCallback(this.ensurePolymerIsLoaded_.bind(this));
33 }, 34 },
34 35
35 /** @override */ 36 /** @override */
36 didClosePage: function() { 37 didClosePage: function() {
37 settings.navigateTo(settings.Route.PEOPLE); 38 settings.navigateTo(settings.Route.PEOPLE);
38 }, 39 },
39 40
40 /** @override */ 41 /** @override */
41 didShowPage: function() { 42 didShowPage: function() {
42 this.ensurePolymerIsLoaded_().then(this.onPolymerLoaded_.bind(this)); 43 this.ensurePolymerIsLoaded_().then(this.onPolymerLoaded_.bind(this));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 82
82 QuickUnlockConfigureOverlay.dismiss = function() { 83 QuickUnlockConfigureOverlay.dismiss = function() {
83 PageManager.closeOverlay(); 84 PageManager.closeOverlay();
84 }; 85 };
85 86
86 // Export 87 // Export
87 return { 88 return {
88 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay 89 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay
89 }; 90 };
90 }); 91 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698