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

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

Issue 2728453003: preload polymer elements in options page (Closed)
Patch Set: rebase Created 3 years, 9 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 | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | 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
34 if (loadTimeData.getBoolean('enablePolymerPreload'))
35 requestIdleCallback(this.ensurePolymerIsLoaded_.bind(this));
33 }, 36 },
34 37
35 /** @override */ 38 /** @override */
36 didClosePage: function() { 39 didClosePage: function() {
37 settings.navigateTo(settings.Route.PEOPLE); 40 settings.navigateTo(settings.Route.PEOPLE);
38 }, 41 },
39 42
40 /** @override */ 43 /** @override */
41 didShowPage: function() { 44 didShowPage: function() {
42 this.ensurePolymerIsLoaded_().then(this.onPolymerLoaded_.bind(this)); 45 this.ensurePolymerIsLoaded_().then(this.onPolymerLoaded_.bind(this));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 90
88 QuickUnlockConfigureOverlay.dismiss = function() { 91 QuickUnlockConfigureOverlay.dismiss = function() {
89 PageManager.closeOverlay(); 92 PageManager.closeOverlay();
90 }; 93 };
91 94
92 // Export 95 // Export
93 return { 96 return {
94 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay 97 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay
95 }; 98 };
96 }); 99 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698