| 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' show the details (permissions and usage) for a given origin | 7 * 'site-details' show the details (permissions and usage) for a given origin |
| 8 * under Site Settings. | 8 * under Site Settings. |
| 9 * | 9 * |
| 10 * Example: | 10 * Example: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 type: String, | 40 type: String, |
| 41 observer: 'onStoredDataChanged_', | 41 observer: 'onStoredDataChanged_', |
| 42 }, | 42 }, |
| 43 }, | 43 }, |
| 44 | 44 |
| 45 ready: function() { | 45 ready: function() { |
| 46 this.$.cookies.category = settings.ContentSettingsTypes.COOKIES; | 46 this.$.cookies.category = settings.ContentSettingsTypes.COOKIES; |
| 47 this.$.javascript.category = settings.ContentSettingsTypes.JAVASCRIPT; | 47 this.$.javascript.category = settings.ContentSettingsTypes.JAVASCRIPT; |
| 48 this.$.popups.category = settings.ContentSettingsTypes.POPUPS; | 48 this.$.popups.category = settings.ContentSettingsTypes.POPUPS; |
| 49 this.$.geolocation.category = settings.ContentSettingsTypes.GEOLOCATION; | 49 this.$.geolocation.category = settings.ContentSettingsTypes.GEOLOCATION; |
| 50 this.$.notification.category = settings.ContentSettingsTypes.NOTIFICATION; | 50 this.$.notification.category = settings.ContentSettingsTypes.NOTIFICATIONS; |
| 51 this.$.fullscreen.category = settings.ContentSettingsTypes.FULLSCREEN; | 51 this.$.fullscreen.category = settings.ContentSettingsTypes.FULLSCREEN; |
| 52 this.$.camera.category = settings.ContentSettingsTypes.CAMERA; | 52 this.$.camera.category = settings.ContentSettingsTypes.CAMERA; |
| 53 this.$.mic.category = settings.ContentSettingsTypes.MIC; | 53 this.$.mic.category = settings.ContentSettingsTypes.MIC; |
| 54 | 54 |
| 55 this.storedData_ = '1337 MB'; // TODO(finnur): Fetch actual data. | 55 this.storedData_ = '1337 MB'; // TODO(finnur): Fetch actual data. |
| 56 }, | 56 }, |
| 57 | 57 |
| 58 onStoredDataChanged_: function() { | 58 onStoredDataChanged_: function() { |
| 59 this.$.usage.hidden = false; | 59 this.$.usage.hidden = false; |
| 60 this.$.storage.hidden = false; | 60 this.$.storage.hidden = false; |
| 61 }, | 61 }, |
| 62 | 62 |
| 63 onClearStorage_: function() { | 63 onClearStorage_: function() { |
| 64 // TODO(finnur): Implement. | 64 // TODO(finnur): Implement. |
| 65 }, | 65 }, |
| 66 | 66 |
| 67 onClearAndReset_: function() { | 67 onClearAndReset_: function() { |
| 68 Array.prototype.forEach.call( | 68 Array.prototype.forEach.call( |
| 69 this.root.querySelectorAll('site-details-permission'), | 69 this.root.querySelectorAll('site-details-permission'), |
| 70 function(element) { element.resetPermission(); }); | 70 function(element) { element.resetPermission(); }); |
| 71 | 71 |
| 72 this.onClearStorage_(); | 72 this.onClearStorage_(); |
| 73 }, | 73 }, |
| 74 }); | 74 }); |
| OLD | NEW |