blob: e37989d352510b64121d429b95aea0acb9a9953b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// Copyright (c) 2012 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.
/**
* @fileoverview Oobe reset screen implementation.
*/
login.createScreen('ResetScreen', 'reset', function() {
return {
/**
* Header text of the screen.
* @type {string}
*/
get header() {
return loadTimeData.getString('resetScreenTitle');
},
/**
* Buttons in oobe wizard's button strip.
* @type {array} Array of Buttons.
*/
get buttons() {
var buttons = [];
var resetButton = this.ownerDocument.createElement('button');
resetButton.id = 'reset-button';
resetButton.textContent = loadTimeData.getString('resetButton');
resetButton.addEventListener('click', function(e) {
chrome.send('resetOnReset');
e.stopPropagation();
});
buttons.push(resetButton);
var cancelButton = this.ownerDocument.createElement('button');
cancelButton.id = 'reset-cancel-button';
cancelButton.textContent = loadTimeData.getString('cancelButton');
cancelButton.addEventListener('click', function(e) {
chrome.send('resetOnCancel');
e.stopPropagation();
});
buttons.push(cancelButton);
return buttons;
},
/**
* Returns a control which should receive an initial focus.
*/
get defaultControl() {
return $('reset-cancel-button');
},
/**
* Cancels the reset and drops the user back to the login screen.
*/
cancel: function() {
chrome.send('resetOnCancel');
}
};
});
|