| 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 * Example: | 10 * Example: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 properties: { | 24 properties: { |
| 25 /** | 25 /** |
| 26 * Preferences state. | 26 * Preferences state. |
| 27 */ | 27 */ |
| 28 prefs: { | 28 prefs: { |
| 29 type: Object, | 29 type: Object, |
| 30 notify: true, | 30 notify: true, |
| 31 }, | 31 }, |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * The ID of the category this widget is displaying data for. | |
| 35 */ | |
| 36 category: Number, | |
| 37 | |
| 38 /** | |
| 39 * The origin, which this permission affects. | 34 * The origin, which this permission affects. |
| 40 */ | 35 */ |
| 41 origin: { | 36 origin: { |
| 42 type: String, | 37 type: String, |
| 43 observer: 'initialize_', | 38 observer: 'initialize_', |
| 44 }, | 39 }, |
| 45 | 40 |
| 46 i18n_: { | 41 i18n_: { |
| 47 readOnly: true, | 42 readOnly: true, |
| 48 type: Object, | 43 type: Object, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 * @param {!{target: !{selectedItem: !{innerText: string}}}} event | 82 * @param {!{target: !{selectedItem: !{innerText: string}}}} event |
| 88 */ | 83 */ |
| 89 onPermissionMenuIronSelect_: function(event) { | 84 onPermissionMenuIronSelect_: function(event) { |
| 90 var action = event.target.selectedItem.innerText; | 85 var action = event.target.selectedItem.innerText; |
| 91 var value = (action == this.i18n_.allowAction) ? | 86 var value = (action == this.i18n_.allowAction) ? |
| 92 settings.PermissionValues.ALLOW : | 87 settings.PermissionValues.ALLOW : |
| 93 settings.PermissionValues.BLOCK; | 88 settings.PermissionValues.BLOCK; |
| 94 this.setCategoryPermissionForOrigin(this.origin, value, this.category); | 89 this.setCategoryPermissionForOrigin(this.origin, value, this.category); |
| 95 }, | 90 }, |
| 96 }); | 91 }); |
| OLD | NEW |