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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 // is redundant to also list all the sites that are blocked. | 464 // is redundant to also list all the sites that are blocked. |
465 if (this.isAllowList_()) | 465 if (this.isAllowList_()) |
466 return true; | 466 return true; |
467 | 467 |
468 if (this.isSessionOnlyList_()) | 468 if (this.isSessionOnlyList_()) |
469 return siteList.length > 0; | 469 return siteList.length > 0; |
470 | 470 |
471 return toggleState; | 471 return toggleState; |
472 }, | 472 }, |
473 }); | 473 }); |
OLD | NEW |