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

Unified Diff: chrome/browser/resources/options/easy_unlock_turn_off_overlay.js

Issue 445503003: Update easy unlock settings UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use hard coded phone model name Created 6 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/easy_unlock_turn_off_overlay.js
diff --git a/chrome/browser/resources/options/easy_unlock_turn_off_overlay.js b/chrome/browser/resources/options/easy_unlock_turn_off_overlay.js
new file mode 100644
index 0000000000000000000000000000000000000000..f1136a6c616e9b28e95c49026cfe12314167bf81
--- /dev/null
+++ b/chrome/browser/resources/options/easy_unlock_turn_off_overlay.js
@@ -0,0 +1,48 @@
+// Copyright 2014 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;
+
+ /**
+ * EasyUnlockTurnOffOverlay class
+ * Encapsulated handling of the Factory Reset confirmation overlay page.
+ * @class
+ */
+ function EasyUnlockTurnOffOverlay() {
+ Page.call(this, 'easyUnlockTurnOffOverlay',
+ loadTimeData.getString('easyUnlockTurnOffTitle'),
+ 'easy-unlock-turn-off-overlay');
+ }
+
+ cr.addSingletonGetter(EasyUnlockTurnOffOverlay);
+
+ EasyUnlockTurnOffOverlay.prototype = {
+ // Inherit EasyUnlockTurnOffOverlay from Page.
+ __proto__: Page.prototype,
+
+ /** @override */
+ initializePage: function() {
+ Page.prototype.initializePage.call(this);
+
+ $('easy-unlock-turn-off-dismiss').onclick = function(event) {
+ EasyUnlockTurnOffOverlay.dismiss();
+ };
+ $('easy-unlock-turn-off-confirm').onclick = function(event) {
+ var clearData = $('easy-unlock-clear-server-data').checked;
+ chrome.send('turnOffEasyUnlock', [clearData]);
+ };
+ },
+ };
+
+ EasyUnlockTurnOffOverlay.dismiss = function() {
+ PageManager.closeOverlay();
+ };
+
+ // Export
+ return {
+ EasyUnlockTurnOffOverlay: EasyUnlockTurnOffOverlay
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698