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

Unified Diff: chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js

Issue 2236213002: Add quick unlock Settings in options page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporate comments from jdufault@ Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698