Chromium Code Reviews| 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 ///////////////////////////////////////////////////////////////////////////// | 10 ///////////////////////////////////////////////////////////////////////////// |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 this.updatePage_(hash); | 79 this.updatePage_(hash); |
| 80 | 80 |
| 81 $('resourceType').value = hash; | 81 $('resourceType').value = hash; |
| 82 }, | 82 }, |
| 83 | 83 |
| 84 /** | 84 /** |
| 85 * Creates, decorates and initializes the origin list. | 85 * Creates, decorates and initializes the origin list. |
| 86 * @private | 86 * @private |
| 87 */ | 87 */ |
| 88 createOriginsList_: function() { | 88 createOriginsList_: function() { |
| 89 this.allowedList_ = $('allowed-origin-list'); | 89 var allowedList = $('allowed-origin-list'); |
| 90 options.OriginList.decorate(this.allowedList_); | 90 options.OriginList.decorate(allowedList); |
| 91 this.allowedList_ = allowedList; | |
|
Dan Beam
2014/09/11 05:26:12
did you mean to have an assertInstanceof() here?
Vitaly Pavlenko
2014/09/11 21:12:31
Done.
| |
| 91 this.allowedList_.autoExpands = true; | 92 this.allowedList_.autoExpands = true; |
| 92 | 93 |
| 93 this.blockedList_ = $('blocked-origin-list'); | 94 var blockedList = $('blocked-origin-list'); |
| 94 options.OriginList.decorate(this.blockedList_); | 95 options.OriginList.decorate(blockedList); |
| 96 this.blockedList_ = blockedList; | |
| 95 this.blockedList_.autoExpands = true; | 97 this.blockedList_.autoExpands = true; |
| 96 }, | 98 }, |
| 97 | 99 |
| 98 /** | 100 /** |
| 99 * Populate an origin list with all of the origins with a given permission | 101 * Populate an origin list with all of the origins with a given permission |
| 100 * or that are using a given resource. | 102 * or that are using a given resource. |
| 101 * @param {OriginList} originList A list to populate. | 103 * @param {OriginList} originList A list to populate. |
| 102 * @param {!Object} originDict A dictionary of origins to their usage, which | 104 * @param {!Object} originDict A dictionary of origins to their usage, which |
| 103 will be used to sort the origins. | 105 will be used to sort the origins. |
| 104 * @private | 106 * @private |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 | 194 |
| 193 WebsiteSettingsManager.showEditPage = function(url) { | 195 WebsiteSettingsManager.showEditPage = function(url) { |
| 194 WebsiteSettingsEditor.getInstance().populatePage(url); | 196 WebsiteSettingsEditor.getInstance().populatePage(url); |
| 195 }; | 197 }; |
| 196 | 198 |
| 197 // Export | 199 // Export |
| 198 return { | 200 return { |
| 199 WebsiteSettingsManager: WebsiteSettingsManager | 201 WebsiteSettingsManager: WebsiteSettingsManager |
| 200 }; | 202 }; |
| 201 }); | 203 }); |
| OLD | NEW |