Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_list.js

Issue 2180823004: Migrate <cr-dialog> from PaperDialogBehavior to native <dialog>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698