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

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: Merge conflicts with Tommy's CL. Created 4 years, 4 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698