| 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', function() { | 5 cr.define('options', 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 this.updatePage_(hash); | 96 this.updatePage_(hash); |
| 97 | 97 |
| 98 $('resourceType').value = hash; | 98 $('resourceType').value = hash; |
| 99 }, | 99 }, |
| 100 | 100 |
| 101 /** | 101 /** |
| 102 * Creates, decorates and initializes the origin list. | 102 * Creates, decorates and initializes the origin list. |
| 103 * @private | 103 * @private |
| 104 */ | 104 */ |
| 105 createOriginsList_: function() { | 105 createOriginsList_: function() { |
| 106 this.allowedList_ = $('allowed-origin-list'); | 106 var allowedList = $('allowed-origin-list'); |
| 107 options.OriginList.decorate(this.allowedList_); | 107 options.OriginList.decorate(allowedList); |
| 108 this.allowedList_ = assertInstanceof(allowedList, options.OriginList); |
| 108 this.allowedList_.autoExpands = true; | 109 this.allowedList_.autoExpands = true; |
| 109 | 110 |
| 110 this.blockedList_ = $('blocked-origin-list'); | 111 var blockedList = $('blocked-origin-list'); |
| 111 options.OriginList.decorate(this.blockedList_); | 112 options.OriginList.decorate(blockedList); |
| 113 this.blockedList_ = assertInstanceof(blockedList, options.OriginList); |
| 112 this.blockedList_.autoExpands = true; | 114 this.blockedList_.autoExpands = true; |
| 113 }, | 115 }, |
| 114 | 116 |
| 115 /** | 117 /** |
| 116 * Populate an origin list with all of the origins with a given permission | 118 * Populate an origin list with all of the origins with a given permission |
| 117 * or that are using a given resource. | 119 * or that are using a given resource. |
| 118 * @param {OriginList} originList A list to populate. | 120 * @param {OriginList} originList A list to populate. |
| 119 * @param {!Object} originDict A dictionary of origins to their usage, which | 121 * @param {!Object} originDict A dictionary of origins to their usage, which |
| 120 will be used to sort the origins. | 122 will be used to sort the origins. |
| 121 * @private | 123 * @private |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 251 |
| 250 WebsiteSettingsManager.updateDefault = function(dict) { | 252 WebsiteSettingsManager.updateDefault = function(dict) { |
| 251 WebsiteSettingsManager.getInstance().updateDefault(dict); | 253 WebsiteSettingsManager.getInstance().updateDefault(dict); |
| 252 }; | 254 }; |
| 253 | 255 |
| 254 // Export | 256 // Export |
| 255 return { | 257 return { |
| 256 WebsiteSettingsManager: WebsiteSettingsManager | 258 WebsiteSettingsManager: WebsiteSettingsManager |
| 257 }; | 259 }; |
| 258 }); | 260 }); |
| OLD | NEW |