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

Side by Side Diff: chrome/browser/resources/options/reset_profile_settings_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 7
8 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; 8 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner;
9 var ResetProfileSettingsBanner = options.ResetProfileSettingsBanner; 9 var ResetProfileSettingsBanner = options.ResetProfileSettingsBanner;
10 10
11 /** 11 /**
12 * ResetProfileSettingsOverlay class 12 * ResetProfileSettingsOverlay class
13 * Encapsulated handling of the 'Reset Profile Settings' overlay page. 13 * Encapsulated handling of the 'Reset Profile Settings' overlay page.
14 * @class 14 * @class
15 */ 15 */
16 function ResetProfileSettingsOverlay() { 16 function ResetProfileSettingsOverlay() {
17 OptionsPage.call( 17 Page.call(this, 'resetProfileSettings',
18 this, 'resetProfileSettings', 18 loadTimeData.getString('resetProfileSettingsOverlayTabTitle'),
19 loadTimeData.getString('resetProfileSettingsOverlayTabTitle'), 19 'reset-profile-settings-overlay');
20 'reset-profile-settings-overlay');
21 } 20 }
22 21
23 cr.addSingletonGetter(ResetProfileSettingsOverlay); 22 cr.addSingletonGetter(ResetProfileSettingsOverlay);
24 23
25 ResetProfileSettingsOverlay.prototype = { 24 ResetProfileSettingsOverlay.prototype = {
26 // Inherit ResetProfileSettingsOverlay from OptionsPage. 25 // Inherit ResetProfileSettingsOverlay from Page.
27 __proto__: OptionsPage.prototype, 26 __proto__: Page.prototype,
28 27
29 /** @override */ 28 /** @override */
30 initializePage: function() { 29 initializePage: function() {
31 OptionsPage.prototype.initializePage.call(this); 30 Page.prototype.initializePage.call(this);
32 31
33 $('reset-profile-settings-dismiss').onclick = function(event) { 32 $('reset-profile-settings-dismiss').onclick = function(event) {
34 ResetProfileSettingsOverlay.dismiss(); 33 ResetProfileSettingsOverlay.dismiss();
35 }; 34 };
36 $('reset-profile-settings-commit').onclick = function(event) { 35 $('reset-profile-settings-commit').onclick = function(event) {
37 ResetProfileSettingsOverlay.setResettingState(true); 36 ResetProfileSettingsOverlay.setResettingState(true);
38 chrome.send('performResetProfileSettings', 37 chrome.send('performResetProfileSettings',
39 [$('send-settings').checked]); 38 [$('send-settings').checked]);
40 }; 39 };
41 $('expand-feedback').onclick = function(event) { 40 $('expand-feedback').onclick = function(event) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 */ 72 */
74 ResetProfileSettingsOverlay.doneResetting = function() { 73 ResetProfileSettingsOverlay.doneResetting = function() {
75 AutomaticSettingsResetBanner.dismiss(); 74 AutomaticSettingsResetBanner.dismiss();
76 ResetProfileSettingsOverlay.dismiss(); 75 ResetProfileSettingsOverlay.dismiss();
77 }; 76 };
78 77
79 /** 78 /**
80 * Dismisses the overlay. 79 * Dismisses the overlay.
81 */ 80 */
82 ResetProfileSettingsOverlay.dismiss = function() { 81 ResetProfileSettingsOverlay.dismiss = function() {
83 OptionsPage.closeOverlay(); 82 PageManager.closeOverlay();
84 ResetProfileSettingsOverlay.setResettingState(false); 83 ResetProfileSettingsOverlay.setResettingState(false);
85 }; 84 };
86 85
87 ResetProfileSettingsOverlay.setFeedbackInfo = function(feedbackListData) { 86 ResetProfileSettingsOverlay.setFeedbackInfo = function(feedbackListData) {
88 var input = new JsEvalContext(feedbackListData); 87 var input = new JsEvalContext(feedbackListData);
89 var output = $('feedback-template'); 88 var output = $('feedback-template');
90 jstProcess(input, output); 89 jstProcess(input, output);
91 }; 90 };
92 91
93 // Export 92 // Export
94 return { 93 return {
95 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay 94 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay
96 }; 95 };
97 }); 96 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698