| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |