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 * 'all-sites' is the polymer element for showing the list of all sites under | 7 * 'all-sites' is the polymer element for showing the list of all sites under |
8 * Site Settings. | 8 * Site Settings. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 return Promise.all(promiseList); | 59 return Promise.all(promiseList); |
60 }, | 60 }, |
61 | 61 |
62 /** | 62 /** |
63 * A handler for selecting a site (by clicking on the origin). | 63 * A handler for selecting a site (by clicking on the origin). |
64 * @param {!{model: !{item: !SiteException}}} event | 64 * @param {!{model: !{item: !SiteException}}} event |
65 * @private | 65 * @private |
66 */ | 66 */ |
67 onOriginTap_: function(event) { | 67 onOriginTap_: function(event) { |
68 settings.navigateTo( | 68 settings.navigateTo( |
69 settings.Route.SITE_SETTINGS_SITE_DETAILS, | 69 settings.routes.SITE_SETTINGS_SITE_DETAILS, |
70 new URLSearchParams('site=' + event.model.item.origin)); | 70 new URLSearchParams('site=' + event.model.item.origin)); |
71 }, | 71 }, |
72 | 72 |
73 /** @private */ | 73 /** @private */ |
74 populateList_: function() { | 74 populateList_: function() { |
75 this.getAllSitesList_().then(this.processExceptions_.bind(this)); | 75 this.getAllSitesList_().then(this.processExceptions_.bind(this)); |
76 }, | 76 }, |
77 | 77 |
78 /** | 78 /** |
79 * Process the exception list returned from the native layer. | 79 * Process the exception list returned from the native layer. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 /** @type {!SiteException} */ | 136 /** @type {!SiteException} */ |
137 var siteException = this.expandSiteException(sites[i]); | 137 var siteException = this.expandSiteException(sites[i]); |
138 results.push(siteException); | 138 results.push(siteException); |
139 lastOrigin = siteException.origin; | 139 lastOrigin = siteException.origin; |
140 lastEmbeddingOrigin = siteException.embeddingOrigin; | 140 lastEmbeddingOrigin = siteException.embeddingOrigin; |
141 } | 141 } |
142 return results; | 142 return results; |
143 }, | 143 }, |
144 }); | 144 }); |
OLD | NEW |