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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_screen_reset_confirmation_overlay.js

Issue 609803002: UI rework for reset options including Rollback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Strings and views nits. Rollback view is unset on screen cancel. Created 6 years, 2 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/chromeos/login/oobe_screen_reset_confirmation_overlay.js
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_reset_confirmation_overlay.js b/chrome/browser/resources/chromeos/login/oobe_screen_reset_confirmation_overlay.js
new file mode 100644
index 0000000000000000000000000000000000000000..188acb9e7585dcd62ed7e40299bcb28231af4982
--- /dev/null
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_reset_confirmation_overlay.js
@@ -0,0 +1,57 @@
+// 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('reset', function() {
+
+ /**
+ * ResetScreenConfirmationOverlay class
+ * Encapsulated handling of the 'Confirm reset device' overlay OOBE page.
+ * @class
+ */
+ function ConfirmResetOverlay() {
+ }
+
+ cr.addSingletonGetter(ConfirmResetOverlay);
+
+ ConfirmResetOverlay.prototype = {
+ /**
+ * Initialize the page.
+ */
+ initializePage: function() {
+ var overlay = $('reset-confirm-overlay');
+ overlay.addEventListener('cancelOverlay', this.handleDismiss_.bind(this));
+
+ $('reset-confirm-dismiss').addEventListener('click', this.handleDismiss_);
+ $('reset-confirm-commit').addEventListener('click', this.handleCommit_);
+
+ $('overlay-reset').removeAttribute('hidden');
+ },
+
+ /**
+ * Handles a click on the dismiss button.
+ * @param {Event} e The click event.
+ */
+ handleDismiss_: function(e) {
+ $('reset').isConfirmational = false;
+ $('overlay-reset').setAttribute('hidden', true);
+ e.stopPropagation();
+ },
+
+ /**
+ * Handles a click on the commit button.
+ * @param {Event} e The click event.
+ */
+ handleCommit_: function(e) {
+ $('reset').isConfirmational = false;
+ chrome.send('powerwashOnReset', [$('reset').rollbackChecked]);
+ $('overlay-reset').setAttribute('hidden', true);
+ e.stopPropagation();
+ },
+ };
+
+ // Export
+ return {
+ ConfirmResetOverlay: ConfirmResetOverlay
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698