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

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

Issue 604373006: Compile chrome://settings, part 9: yet another final battle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@K_blockers_from_bookmarks
Patch Set: Created 6 years, 2 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
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 Page = cr.ui.pageManager.Page; 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
(...skipping 26 matching lines...) Expand all
37 chrome.send('performResetProfileSettings', 37 chrome.send('performResetProfileSettings',
38 [$('send-settings').checked]); 38 [$('send-settings').checked]);
39 }; 39 };
40 $('expand-feedback').onclick = function(e) { 40 $('expand-feedback').onclick = function(e) {
41 var feedbackTemplate = $('feedback-template'); 41 var feedbackTemplate = $('feedback-template');
42 feedbackTemplate.hidden = !feedbackTemplate.hidden; 42 feedbackTemplate.hidden = !feedbackTemplate.hidden;
43 e.preventDefault(); 43 e.preventDefault();
44 }; 44 };
45 }, 45 },
46 46
47 /** @override */ 47 /**
48 * @override
49 * @suppress {checkTypes}
50 * TODO(vitalyp): remove the suppression.
51 */
48 didShowPage: function() { 52 didShowPage: function() {
49 ResetProfileSettingsBanner.dismiss(); 53 ResetProfileSettingsBanner.dismiss();
50 chrome.send('onShowResetProfileDialog'); 54 chrome.send('onShowResetProfileDialog');
51 }, 55 },
52 56
53 /** @override */ 57 /** @override */
54 didClosePage: function() { 58 didClosePage: function() {
55 chrome.send('onHideResetProfileDialog'); 59 chrome.send('onHideResetProfileDialog');
56 }, 60 },
57 }; 61 };
58 62
59 /** 63 /**
60 * Enables/disables UI elements after/while Chrome is performing a reset. 64 * Enables/disables UI elements after/while Chrome is performing a reset.
61 * @param {boolean} state If true, UI elements are disabled. 65 * @param {boolean} state If true, UI elements are disabled.
62 */ 66 */
63 ResetProfileSettingsOverlay.setResettingState = function(state) { 67 ResetProfileSettingsOverlay.setResettingState = function(state) {
64 $('reset-profile-settings-throbber').style.visibility = 68 $('reset-profile-settings-throbber').style.visibility =
65 state ? 'visible' : 'hidden'; 69 state ? 'visible' : 'hidden';
66 $('reset-profile-settings-dismiss').disabled = state; 70 $('reset-profile-settings-dismiss').disabled = state;
67 $('reset-profile-settings-commit').disabled = state; 71 $('reset-profile-settings-commit').disabled = state;
68 }; 72 };
69 73
70 /** 74 /**
71 * Chrome callback to notify ResetProfileSettingsOverlay that the reset 75 * Chrome callback to notify ResetProfileSettingsOverlay that the reset
72 * operation has terminated. 76 * operation has terminated.
77 * @suppress {checkTypes}
78 * TODO(vitalyp): remove the suppression.
73 */ 79 */
74 ResetProfileSettingsOverlay.doneResetting = function() { 80 ResetProfileSettingsOverlay.doneResetting = function() {
75 AutomaticSettingsResetBanner.dismiss(); 81 AutomaticSettingsResetBanner.dismiss();
76 ResetProfileSettingsOverlay.dismiss(); 82 ResetProfileSettingsOverlay.dismiss();
77 }; 83 };
78 84
79 /** 85 /**
80 * Dismisses the overlay. 86 * Dismisses the overlay.
81 */ 87 */
82 ResetProfileSettingsOverlay.dismiss = function() { 88 ResetProfileSettingsOverlay.dismiss = function() {
83 PageManager.closeOverlay(); 89 PageManager.closeOverlay();
84 ResetProfileSettingsOverlay.setResettingState(false); 90 ResetProfileSettingsOverlay.setResettingState(false);
85 }; 91 };
86 92
87 ResetProfileSettingsOverlay.setFeedbackInfo = function(feedbackListData) { 93 ResetProfileSettingsOverlay.setFeedbackInfo = function(feedbackListData) {
88 var input = new JsEvalContext(feedbackListData); 94 var input = new JsEvalContext(feedbackListData);
89 var output = $('feedback-template'); 95 var output = $('feedback-template');
90 jstProcess(input, output); 96 jstProcess(input, output);
91 }; 97 };
92 98
93 // Export 99 // Export
94 return { 100 return {
95 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay 101 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay
96 }; 102 };
97 }); 103 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698