OLD | NEW |
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-details-dialog' provides a dialog to show details of site data | 7 * 'site-data-details-dialog' provides a dialog to show details of site data |
8 * stored by a given site. | 8 * stored by a given site. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 /** | 47 /** |
48 * Opens the dialog. | 48 * Opens the dialog. |
49 * @param {!settings.CookieTreeNode} site The site to show data for. | 49 * @param {!settings.CookieTreeNode} site The site to show data for. |
50 */ | 50 */ |
51 open: function(site) { | 51 open: function(site) { |
52 this.site_ = site; | 52 this.site_ = site; |
53 this.populateDialog_(); | 53 this.populateDialog_(); |
54 this.listener_ = cr.addWebUIListener( | 54 this.listener_ = cr.addWebUIListener( |
55 'onTreeItemRemoved', this.onTreeItemRemoved_.bind(this)); | 55 'onTreeItemRemoved', this.onTreeItemRemoved_.bind(this)); |
56 this.$.dialog.open(); | 56 this.$.dialog.showModal(); |
57 }, | 57 }, |
58 | 58 |
59 /** | 59 /** |
60 * Populates the dialog with the data about the site. | 60 * Populates the dialog with the data about the site. |
61 */ | 61 */ |
62 populateDialog_: function() { | 62 populateDialog_: function() { |
63 this.title_ = loadTimeData.getStringF('siteSettingsCookieDialog', | 63 this.title_ = loadTimeData.getStringF('siteSettingsCookieDialog', |
64 this.site_.data_.title); | 64 this.site_.data_.title); |
65 | 65 |
66 this.entries_ = this.site_.getCookieList(); | 66 this.entries_ = this.site_.getCookieList(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 }, | 157 }, |
158 | 158 |
159 /** | 159 /** |
160 * A handler for when the user opts to remove all cookies. | 160 * A handler for when the user opts to remove all cookies. |
161 */ | 161 */ |
162 onRemoveAll_: function(event) { | 162 onRemoveAll_: function(event) { |
163 cr.removeWebUIListener(this.listener_); | 163 cr.removeWebUIListener(this.listener_); |
164 this.browserProxy.removeCookie(this.site_.data_.id); | 164 this.browserProxy.removeCookie(this.site_.data_.id); |
165 }, | 165 }, |
166 }); | 166 }); |
OLD | NEW |