| OLD | NEW |
| 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 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 ////////////////////////////////////////////////////////////////////////////// | 8 ////////////////////////////////////////////////////////////////////////////// |
| 9 // ContentSettings class: | 9 // ContentSettings class: |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 document.querySelector('input[type=radio][name=' + group + '][value=' + | 85 document.querySelector('input[type=radio][name=' + group + '][value=' + |
| 86 dict[group]['value'] + ']').checked = true; | 86 dict[group]['value'] + ']').checked = true; |
| 87 var radios = document.querySelectorAll('input[type=radio][name=' + | 87 var radios = document.querySelectorAll('input[type=radio][name=' + |
| 88 group + ']'); | 88 group + ']'); |
| 89 var managedBy = dict[group]['managedBy']; | 89 var managedBy = dict[group]['managedBy']; |
| 90 for (var i = 0, len = radios.length; i < len; i++) { | 90 for (var i = 0, len = radios.length; i < len; i++) { |
| 91 radios[i].disabled = (managedBy != 'default'); | 91 radios[i].disabled = (managedBy != 'default'); |
| 92 radios[i].controlledBy = managedBy; | 92 radios[i].controlledBy = managedBy; |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 OptionsPage.updateManagedBannerVisibility(); | 95 BrowserOptions.updateManagedBannerVisibility(); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 /** | 98 /** |
| 99 * Initializes an exceptions list. | 99 * Initializes an exceptions list. |
| 100 * @param {string} type The content type that we are setting exceptions for. | 100 * @param {string} type The content type that we are setting exceptions for. |
| 101 * @param {Array} list An array of pairs, where the first element of each pair | 101 * @param {Array} list An array of pairs, where the first element of each pair |
| 102 * is the filter string, and the second is the setting (allow/block). | 102 * is the filter string, and the second is the setting (allow/block). |
| 103 */ | 103 */ |
| 104 ContentSettings.setExceptions = function(type, list) { | 104 ContentSettings.setExceptions = function(type, list) { |
| 105 var exceptionsList = | 105 var exceptionsList = |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 'list[mode=' + mode + ']'); | 141 'list[mode=' + mode + ']'); |
| 142 exceptionsList.patternValidityCheckComplete(pattern, valid); | 142 exceptionsList.patternValidityCheckComplete(pattern, valid); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 // Export | 145 // Export |
| 146 return { | 146 return { |
| 147 ContentSettings: ContentSettings | 147 ContentSettings: ContentSettings |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 }); | 150 }); |
| OLD | NEW |