| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * ClearBrowserDataOverlay class | 9 * ClearBrowserDataOverlay class |
| 10 * Encapsulated handling of the 'Clear Browser Data' overlay page. | 10 * Encapsulated handling of the 'Clear Browser Data' overlay page. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 $('deleteFormDataCheckbox').disabled = state; | 82 $('deleteFormDataCheckbox').disabled = state; |
| 83 $('clearBrowserDataTimePeriod').disabled = state; | 83 $('clearBrowserDataTimePeriod').disabled = state; |
| 84 $('cbdThrobber').style.visibility = state ? 'visible' : 'hidden'; | 84 $('cbdThrobber').style.visibility = state ? 'visible' : 'hidden'; |
| 85 | 85 |
| 86 if (state) | 86 if (state) |
| 87 $('clearBrowserDataCommit').disabled = true; | 87 $('clearBrowserDataCommit').disabled = true; |
| 88 else | 88 else |
| 89 ClearBrowserDataOverlay.getInstance().updateCommitButtonState_(); | 89 ClearBrowserDataOverlay.getInstance().updateCommitButtonState_(); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 ClearBrowserDataOverlay.setClearLocalDataLabel = function(label) { | |
| 93 $('deleteCookiesLabel').innerText = label; | |
| 94 }; | |
| 95 | |
| 96 ClearBrowserDataOverlay.doneClearing = function() { | 92 ClearBrowserDataOverlay.doneClearing = function() { |
| 97 // The delay gives the user some feedback that the clearing | 93 // The delay gives the user some feedback that the clearing |
| 98 // actually worked. Otherwise the dialog just vanishes instantly in most | 94 // actually worked. Otherwise the dialog just vanishes instantly in most |
| 99 // cases. | 95 // cases. |
| 100 window.setTimeout(function() { | 96 window.setTimeout(function() { |
| 101 ClearBrowserDataOverlay.dismiss(); | 97 ClearBrowserDataOverlay.dismiss(); |
| 102 }, 200); | 98 }, 200); |
| 103 }; | 99 }; |
| 104 | 100 |
| 105 ClearBrowserDataOverlay.dismiss = function() { | 101 ClearBrowserDataOverlay.dismiss = function() { |
| 106 OptionsPage.closeOverlay(); | 102 OptionsPage.closeOverlay(); |
| 107 this.setClearingState(false); | 103 this.setClearingState(false); |
| 108 }; | 104 }; |
| 109 | 105 |
| 110 // Export | 106 // Export |
| 111 return { | 107 return { |
| 112 ClearBrowserDataOverlay: ClearBrowserDataOverlay | 108 ClearBrowserDataOverlay: ClearBrowserDataOverlay |
| 113 }; | 109 }; |
| 114 }); | 110 }); |
| OLD | NEW |