| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 /////////////////////////////////////////////////////////////////////////////// | 5 /////////////////////////////////////////////////////////////////////////////// |
| 6 // ContentSettings class: | 6 // ContentSettings class: |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Encapsulated handling of content settings page. | 9 * Encapsulated handling of content settings page. |
| 10 * @constructor | 10 * @constructor |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // TODO(estade): show cookies and other site data page. | 45 // TODO(estade): show cookies and other site data page. |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 // Images filter page ------------------------------------------------------ | 48 // Images filter page ------------------------------------------------------ |
| 49 $('images-exceptions-button').onclick = function(event) { | 49 $('images-exceptions-button').onclick = function(event) { |
| 50 // TODO(estade): show a dialog. | 50 // TODO(estade): show a dialog. |
| 51 // TODO(estade): remove this hack. | 51 // TODO(estade): remove this hack. |
| 52 imagesExceptionsList.redraw(); | 52 imagesExceptionsList.redraw(); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 options.contentSettings.ExceptionsList.decorate($('imagesExceptionsList')); | 55 options.contentSettings.ExceptionsArea.decorate($('imagesExceptionsArea')); |
| 56 }, | 56 }, |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * Shows the tab contents for the given navigation tab. | 59 * Shows the tab contents for the given navigation tab. |
| 60 * @param {!Element} tab The tab that the user clicked. | 60 * @param {!Element} tab The tab that the user clicked. |
| 61 */ | 61 */ |
| 62 showTab: function(tab) { | 62 showTab: function(tab) { |
| 63 if (!tab.classList.contains('inactive-tab')) | 63 if (!tab.classList.contains('inactive-tab')) |
| 64 return; | 64 return; |
| 65 | 65 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 86 '][value=' + dict[group] + ']').checked = true; | 86 '][value=' + dict[group] + ']').checked = true; |
| 87 } | 87 } |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 /** | 90 /** |
| 91 * Initializes the image exceptions list. | 91 * Initializes the image exceptions list. |
| 92 * @param {Array} list An array of pairs, where the first element of each pair | 92 * @param {Array} list An array of pairs, where the first element of each pair |
| 93 * is the filter string, and the second is the setting (allow/block). | 93 * is the filter string, and the second is the setting (allow/block). |
| 94 */ | 94 */ |
| 95 ContentSettings.setImagesExceptions = function(list) { | 95 ContentSettings.setImagesExceptions = function(list) { |
| 96 imagesExceptionsList.clear(); |
| 96 for (var i = 0; i < list.length; ++i) { | 97 for (var i = 0; i < list.length; ++i) { |
| 97 imagesExceptionsList.addException(list[i]); | 98 imagesExceptionsList.addException(list[i]); |
| 98 } | 99 } |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 /** | 102 /** |
| 102 * Sets the initial value for the Third Party Cookies checkbox. | 103 * Sets the initial value for the Third Party Cookies checkbox. |
| 103 * @param {boolean=} block True if we are blocking third party cookies. | 104 * @param {boolean=} block True if we are blocking third party cookies. |
| 104 */ | 105 */ |
| 105 ContentSettings.setBlockThirdPartyCookies = function(block) { | 106 ContentSettings.setBlockThirdPartyCookies = function(block) { |
| 106 $('block-third-party-cookies').checked = block; | 107 $('block-third-party-cookies').checked = block; |
| 107 }; | 108 }; |
| OLD | NEW |