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.
5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage;
9 * FactoryResetOverlay class
10 * Encapsulated handling of the Factory Reset confirmation overlay page.
13 function FactoryResetOverlay() {
14 OptionsPage.call(this, 'factoryResetData',
15 loadTimeData.getString('factoryResetTitle'),
16 'factory-reset-overlay');
19 cr.addSingletonGetter(FactoryResetOverlay);
21 FactoryResetOverlay.prototype = {
22 // Inherit FactoryResetOverlay from OptionsPage.
23 __proto__: OptionsPage.prototype,
26 * Initialize the page.
28 initializePage: function() {
29 // Call base class implementation to starts preference initialization.
30 OptionsPage.prototype.initializePage.call(this);
32 $('factory-reset-data-dismiss').onclick = function(event) {
33 FactoryResetOverlay.dismiss();
35 $('factory-reset-data-restart').onclick = function(event) {
36 chrome.send('performFactoryResetRestart');
41 FactoryResetOverlay.dismiss = function() {
42 OptionsPage.closeOverlay();
47 FactoryResetOverlay: FactoryResetOverlay