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

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

Issue 2557073003: Call preventDefault in all on-tap events that show a dialog. (Closed)
Patch Set: nit Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * 'site-data' handles showing the local storage summary list for all sites. 7 * 'site-data' handles showing the local storage summary list for all sites.
8 */ 8 */
9 9
10 Polymer({ 10 Polymer({
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return loadTimeData.getString('siteSettingsCookieRemoveAllShown'); 68 return loadTimeData.getString('siteSettingsCookieRemoveAllShown');
69 }, 69 },
70 70
71 /** @private */ 71 /** @private */
72 onCloseDialog_: function() { 72 onCloseDialog_: function() {
73 this.$.confirmDeleteDialog.close(); 73 this.$.confirmDeleteDialog.close();
74 }, 74 },
75 75
76 /** 76 /**
77 * Shows a dialog to confirm the deletion of multiple sites. 77 * Shows a dialog to confirm the deletion of multiple sites.
78 * @param {!Event} e
78 * @private 79 * @private
79 */ 80 */
80 onConfirmDeleteMultipleSites_: function() { 81 onConfirmDeleteMultipleSites_: function(e) {
82 e.preventDefault();
81 this.idToDelete_ = ''; // Delete all. 83 this.idToDelete_ = ''; // Delete all.
82 this.confirmationDeleteMsg_ = loadTimeData.getString( 84 this.confirmationDeleteMsg_ = loadTimeData.getString(
83 'siteSettingsCookieRemoveMultipleConfirmation'); 85 'siteSettingsCookieRemoveMultipleConfirmation');
84 this.$.confirmDeleteDialog.showModal(); 86 this.$.confirmDeleteDialog.showModal();
85 }, 87 },
86 88
87 /** 89 /**
88 * Called when deletion for a single/multiple sites has been confirmed. 90 * Called when deletion for a single/multiple sites has been confirmed.
89 * @private 91 * @private
90 */ 92 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 126
125 /** 127 /**
126 * @param {!{model: !{item: CookieDataSummaryItem}}} event 128 * @param {!{model: !{item: CookieDataSummaryItem}}} event
127 * @private 129 * @private
128 */ 130 */
129 onSiteTap_: function(event) { 131 onSiteTap_: function(event) {
130 settings.navigateTo(settings.Route.SITE_SETTINGS_DATA_DETAILS, 132 settings.navigateTo(settings.Route.SITE_SETTINGS_DATA_DETAILS,
131 new URLSearchParams('site=' + event.model.item.site)); 133 new URLSearchParams('site=' + event.model.item.site));
132 }, 134 },
133 }); 135 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698