| OLD | NEW |
| 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 * 'site-details-permission' handles showing the state of one permission, such | 7 * 'site-details-permission' handles showing the state of one permission, such |
| 8 * as Geolocation, for a given origin. | 8 * as Geolocation, for a given origin. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 if (origin == '' || (origin == this.site.origin && | 79 if (origin == '' || (origin == this.site.origin && |
| 80 embeddingOrigin == this.site.embeddingOrigin)) { | 80 embeddingOrigin == this.site.embeddingOrigin)) { |
| 81 this.siteChanged_(this.site); | 81 this.siteChanged_(this.site); |
| 82 } | 82 } |
| 83 }, | 83 }, |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * Resets the category permission for this origin. | 86 * Resets the category permission for this origin. |
| 87 */ | 87 */ |
| 88 resetPermission: function() { | 88 resetPermission: function() { |
| 89 this.resetCategoryPermissionForOrigin( | 89 this.browserProxy.resetCategoryPermissionForOrigin( |
| 90 this.site.origin, this.site.embeddingOrigin, this.category); | 90 this.site.origin, this.site.embeddingOrigin, this.category, |
| 91 this.site.incognito); |
| 91 this.$.details.hidden = true; | 92 this.$.details.hidden = true; |
| 92 }, | 93 }, |
| 93 | 94 |
| 94 /** | 95 /** |
| 95 * Handles the category permission changing for this origin. | 96 * Handles the category permission changing for this origin. |
| 96 * @param {!{detail: !{item: !{dataset: !{permissionValue: string}}}}} event | 97 * @param {!{detail: !{item: !{dataset: !{permissionValue: string}}}}} event |
| 97 */ | 98 */ |
| 98 onPermissionMenuIronActivate_: function(event) { | 99 onPermissionMenuIronActivate_: function(event) { |
| 99 var value = event.detail.item.dataset.permissionValue; | 100 var value = event.detail.item.dataset.permissionValue; |
| 100 this.setCategoryPermissionForOrigin( | 101 this.browserProxy.setCategoryPermissionForOrigin( |
| 101 this.site.origin, this.site.embeddingOrigin, this.category, value); | 102 this.site.origin, this.site.embeddingOrigin, this.category, value, |
| 103 this.site.incognito); |
| 102 }, | 104 }, |
| 103 }); | 105 }); |
| OLD | NEW |