| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 cr.define('options', function() { |
| 6 var Page = cr.ui.pageManager.Page; |
| 7 var PageManager = cr.ui.pageManager.PageManager; |
| 8 |
| 9 /** |
| 10 * QuickUnlockConfigureOverlay class |
| 11 * Dialog that allows users to configure screen lock. |
| 12 * @constructor |
| 13 * @extends {cr.ui.pageManager.Page} |
| 14 */ |
| 15 function QuickUnlockConfigureOverlay() { |
| 16 Page.call(this, 'quickUnlockConfigureOverlay', |
| 17 loadTimeData.getString('lockScreenTitle'), |
| 18 'quick-unlock-configure-overlay'); |
| 19 |
| 20 } |
| 21 |
| 22 cr.addSingletonGetter(QuickUnlockConfigureOverlay); |
| 23 |
| 24 QuickUnlockConfigureOverlay.prototype = { |
| 25 __proto__: Page.prototype, |
| 26 |
| 27 /** @override */ |
| 28 initializePage: function() { |
| 29 Page.prototype.initializePage.call(this); |
| 30 document.querySelector('settings-lock-screen').addEventListener( |
| 31 'close-overlay', this.handleCloseOverlay_.bind(this)); |
| 32 }, |
| 33 |
| 34 /** @override */ |
| 35 didClosePage: function() { |
| 36 settings.navigateTo(settings.Route.PEOPLE); |
| 37 }, |
| 38 |
| 39 /** |
| 40 * Handler of window close-overlay event. |
| 41 * @private |
| 42 */ |
| 43 handleCloseOverlay_: function(e) { |
| 44 QuickUnlockConfigureOverlay.dismiss(); |
| 45 } |
| 46 |
| 47 }; |
| 48 |
| 49 QuickUnlockConfigureOverlay.dismiss = function() { |
| 50 PageManager.closeOverlay(); |
| 51 }; |
| 52 |
| 53 // Export |
| 54 return { |
| 55 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay |
| 56 }; |
| 57 }); |
| OLD | NEW |