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 Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager;
10 * FactoryResetOverlay class
11 * Encapsulated handling of the Factory Reset confirmation overlay page.
14 function FactoryResetOverlay() {
15 Page.call(this, 'factoryResetData',
16 loadTimeData.getString('factoryResetTitle'),
17 'factory-reset-overlay');
20 cr.addSingletonGetter(FactoryResetOverlay);
22 FactoryResetOverlay.prototype = {
23 // Inherit FactoryResetOverlay from Page.
24 __proto__: Page.prototype,
27 initializePage: function() {
28 Page.prototype.initializePage.call(this);
30 $('factory-reset-data-dismiss').onclick = function(event) {
31 FactoryResetOverlay.dismiss();
33 $('factory-reset-data-restart').onclick = function(event) {
34 chrome.send('performFactoryResetRestart');
39 FactoryResetOverlay.dismiss = function() {
40 PageManager.closeOverlay();
45 FactoryResetOverlay: FactoryResetOverlay