1 // Copyright (c) 2012 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.
6 * @fileoverview Oobe reset screen implementation.
9 login.createScreen('ResetScreen', 'reset', function() {
12 * Header text of the screen.
16 return loadTimeData.getString('resetScreenTitle');
20 * Buttons in oobe wizard's button strip.
21 * @type {array} Array of Buttons.
26 var resetButton = this.ownerDocument.createElement('button');
27 resetButton.id = 'reset-button';
28 resetButton.textContent = loadTimeData.getString('resetButton');
29 resetButton.addEventListener('click', function(e) {
30 chrome.send('resetOnReset');
33 buttons.push(resetButton);
35 var cancelButton = this.ownerDocument.createElement('button');
36 cancelButton.id = 'reset-cancel-button';
37 cancelButton.textContent = loadTimeData.getString('cancelButton');
38 cancelButton.addEventListener('click', function(e) {
39 chrome.send('resetOnCancel');
42 buttons.push(cancelButton);
48 * Returns a control which should receive an initial focus.
50 get defaultControl() {
51 return $('reset-cancel-button');
55 * Cancels the reset and drops the user back to the login screen.
58 chrome.send('resetOnCancel');