| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.ContentSettings', function() { | 5 cr.define('options.ContentSettings', function() { |
| 6 /** @const */ var Page = cr.ui.pageManager.Page; | 6 /** @const */ var Page = cr.ui.pageManager.Page; |
| 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
| 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| 9 | 9 |
| 10 // Lookup table to generate the i18n strings. | 10 // Lookup table to generate the i18n strings. |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 /** | 143 /** |
| 144 * Populate the origin lists with all of the origins with a given permission | 144 * Populate the origin lists with all of the origins with a given permission |
| 145 * or that are using a given resource, potentially split by if allowed or | 145 * or that are using a given resource, potentially split by if allowed or |
| 146 * denied. If no blocked dictionary is provided, only the allowed list is | 146 * denied. If no blocked dictionary is provided, only the allowed list is |
| 147 * shown. | 147 * shown. |
| 148 * @param {!Object} allowedDict A dictionary of origins to their usage, | 148 * @param {!Object} allowedDict A dictionary of origins to their usage, |
| 149 which will be used to sort the origins in the main/allowed list. | 149 which will be used to sort the origins in the main/allowed list. |
| 150 * @param {!Object} blockedDict An optional dictionary of origins to their | 150 * @param {!Object} blockedDict An optional dictionary of origins to their |
| 151 usage, which will be used to sort the origins in the blocked list. | 151 usage, which will be used to sort the origins in the blocked list. |
| 152 * @param {bool} isGloballyEnabled If the content setting is turned on. | 152 * @param {boolean} isGloballyEnabled If the content setting is turned on. |
| 153 * @private | 153 * @private |
| 154 */ | 154 */ |
| 155 populateOrigins: function(allowedDict, blockedDict, isGloballyEnabled) { | 155 populateOrigins: function(allowedDict, blockedDict, isGloballyEnabled) { |
| 156 this.populateOriginsHelper_(this.allowedList_, allowedDict); | 156 this.populateOriginsHelper_(this.allowedList_, allowedDict); |
| 157 if (blockedDict) { | 157 if (blockedDict) { |
| 158 this.populateOriginsHelper_(this.blockedList_, blockedDict); | 158 this.populateOriginsHelper_(this.blockedList_, blockedDict); |
| 159 this.blockedList_.hidden = false; | 159 this.blockedList_.hidden = false; |
| 160 $('blocked-origin-list-title').hidden = false; | 160 $('blocked-origin-list-title').hidden = false; |
| 161 this.allowedList_.classList.remove('nonsplit-origin-list'); | 161 this.allowedList_.classList.remove('nonsplit-origin-list'); |
| 162 } else { | 162 } else { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 261 |
| 262 WebsiteSettingsManager.showWebsiteSettings = function(hash) { | 262 WebsiteSettingsManager.showWebsiteSettings = function(hash) { |
| 263 PageManager.showPageByName('websiteSettings', true, {hash: '#' + hash}); | 263 PageManager.showPageByName('websiteSettings', true, {hash: '#' + hash}); |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 // Export | 266 // Export |
| 267 return { | 267 return { |
| 268 WebsiteSettingsManager: WebsiteSettingsManager | 268 WebsiteSettingsManager: WebsiteSettingsManager |
| 269 }; | 269 }; |
| 270 }); | 270 }); |
| OLD | NEW |