OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @fileoverview | 6 * @fileoverview |
7 * 'settings-site-list' shows a list of Allowed and Blocked sites for a given | 7 * 'settings-site-list' shows a list of Allowed and Blocked sites for a given |
8 * category. | 8 * category. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 * A handler for the Add Site button. | 181 * A handler for the Add Site button. |
182 * @private | 182 * @private |
183 */ | 183 */ |
184 onAddSiteTap_: function() { | 184 onAddSiteTap_: function() { |
185 var dialog = document.createElement('add-site-dialog'); | 185 var dialog = document.createElement('add-site-dialog'); |
186 dialog.category = this.category; | 186 dialog.category = this.category; |
187 this.shadowRoot.appendChild(dialog); | 187 this.shadowRoot.appendChild(dialog); |
188 | 188 |
189 dialog.open(this.categorySubtype); | 189 dialog.open(this.categorySubtype); |
190 | 190 |
191 dialog.addEventListener('iron-overlay-closed', function() { | 191 dialog.addEventListener('close', function() { |
192 dialog.remove(); | 192 dialog.remove(); |
193 }); | 193 }); |
194 }, | 194 }, |
195 | 195 |
196 /** | 196 /** |
197 * Handles the expanding and collapsing of the sites list. | 197 * Handles the expanding and collapsing of the sites list. |
198 * @private | 198 * @private |
199 */ | 199 */ |
200 onToggle_: function(e) { | 200 onToggle_: function(e) { |
201 if (this.$.category.opened) | 201 if (this.$.category.opened) |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 // is redundant to also list all the sites that are blocked. | 459 // is redundant to also list all the sites that are blocked. |
460 if (this.isAllowList_()) | 460 if (this.isAllowList_()) |
461 return true; | 461 return true; |
462 | 462 |
463 if (this.isSessionOnlyList_()) | 463 if (this.isSessionOnlyList_()) |
464 return siteList.length > 0; | 464 return siteList.length > 0; |
465 | 465 |
466 return toggleState; | 466 return toggleState; |
467 }, | 467 }, |
468 }); | 468 }); |
OLD | NEW |