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

Side by Side Diff: chrome/browser/resources/options/factory_reset_overlay.js

Issue 410293004: Split OptionsPage into Page and PageManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ugh just no Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager;
7 8
8 /** 9 /**
9 * FactoryResetOverlay class 10 * FactoryResetOverlay class
10 * Encapsulated handling of the Factory Reset confirmation overlay page. 11 * Encapsulated handling of the Factory Reset confirmation overlay page.
11 * @class 12 * @class
12 */ 13 */
13 function FactoryResetOverlay() { 14 function FactoryResetOverlay() {
14 OptionsPage.call(this, 'factoryResetData', 15 Page.call(this, 'factoryResetData',
15 loadTimeData.getString('factoryResetTitle'), 16 loadTimeData.getString('factoryResetTitle'),
16 'factory-reset-overlay'); 17 'factory-reset-overlay');
17 } 18 }
18 19
19 cr.addSingletonGetter(FactoryResetOverlay); 20 cr.addSingletonGetter(FactoryResetOverlay);
20 21
21 FactoryResetOverlay.prototype = { 22 FactoryResetOverlay.prototype = {
22 // Inherit FactoryResetOverlay from OptionsPage. 23 // Inherit FactoryResetOverlay from Page.
23 __proto__: OptionsPage.prototype, 24 __proto__: Page.prototype,
24 25
25 /** @override */ 26 /** @override */
26 initializePage: function() { 27 initializePage: function() {
27 // Call base class implementation to starts preference initialization. 28 Page.prototype.initializePage.call(this);
28 OptionsPage.prototype.initializePage.call(this);
29 29
30 $('factory-reset-data-dismiss').onclick = function(event) { 30 $('factory-reset-data-dismiss').onclick = function(event) {
31 FactoryResetOverlay.dismiss(); 31 FactoryResetOverlay.dismiss();
32 }; 32 };
33 $('factory-reset-data-restart').onclick = function(event) { 33 $('factory-reset-data-restart').onclick = function(event) {
34 chrome.send('performFactoryResetRestart'); 34 chrome.send('performFactoryResetRestart');
35 }; 35 };
36 }, 36 },
37 }; 37 };
38 38
39 FactoryResetOverlay.dismiss = function() { 39 FactoryResetOverlay.dismiss = function() {
40 OptionsPage.closeOverlay(); 40 PageManager.closeOverlay();
41 }; 41 };
42 42
43 // Export 43 // Export
44 return { 44 return {
45 FactoryResetOverlay: FactoryResetOverlay 45 FactoryResetOverlay: FactoryResetOverlay
46 }; 46 };
47 }); 47 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/cookies_view.js ('k') | chrome/browser/resources/options/font_settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698