| Index: chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js
|
| diff --git a/chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js b/chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..202ea1292cd9a97ee89c2d16d726e77f3d9dc46d
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js
|
| @@ -0,0 +1,57 @@
|
| +// Copyright 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.
|
| +
|
| +cr.define('options', function() {
|
| + var Page = cr.ui.pageManager.Page;
|
| + var PageManager = cr.ui.pageManager.PageManager;
|
| +
|
| + /**
|
| + * QuickUnlockConfigureOverlay class
|
| + * Dialog that allows users to configure screen lock.
|
| + * @constructor
|
| + * @extends {cr.ui.pageManager.Page}
|
| + */
|
| + function QuickUnlockConfigureOverlay() {
|
| + Page.call(this, 'quickUnlockConfigureOverlay',
|
| + loadTimeData.getString('lockScreenTitle'),
|
| + 'quick-unlock-configure-overlay');
|
| +
|
| + }
|
| +
|
| + cr.addSingletonGetter(QuickUnlockConfigureOverlay);
|
| +
|
| + QuickUnlockConfigureOverlay.prototype = {
|
| + __proto__: Page.prototype,
|
| +
|
| + /** @override */
|
| + initializePage: function() {
|
| + Page.prototype.initializePage.call(this);
|
| + document.querySelector('settings-lock-screen').addEventListener(
|
| + 'close-overlay', this.handleCloseOverlay_.bind(this));
|
| + },
|
| +
|
| + /** @override */
|
| + didClosePage: function() {
|
| + settings.navigateTo(settings.Route.PEOPLE);
|
| + },
|
| +
|
| + /**
|
| + * Handler of window close-overlay event.
|
| + * @private
|
| + */
|
| + handleCloseOverlay_: function(e) {
|
| + QuickUnlockConfigureOverlay.dismiss();
|
| + }
|
| +
|
| + };
|
| +
|
| + QuickUnlockConfigureOverlay.dismiss = function() {
|
| + PageManager.closeOverlay();
|
| + };
|
| +
|
| + // Export
|
| + return {
|
| + QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay
|
| + };
|
| +});
|
|
|