| 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 * An example empty pref. | 6 * An example empty pref. |
| 7 * @type {SiteSettingsPref} | 7 * @type {SiteSettingsPref} |
| 8 */ | 8 */ |
| 9 var prefsEmpty = { | 9 var prefsEmpty = { |
| 10 defaults: { | 10 defaults: { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } else if (contentType == settings.ContentSettingsTypes.IMAGES) { | 119 } else if (contentType == settings.ContentSettingsTypes.IMAGES) { |
| 120 pref = this.prefs_.defaults.images; | 120 pref = this.prefs_.defaults.images; |
| 121 } else if (contentType == settings.ContentSettingsTypes.JAVASCRIPT) { | 121 } else if (contentType == settings.ContentSettingsTypes.JAVASCRIPT) { |
| 122 pref = this.prefs_.defaults.javascript; | 122 pref = this.prefs_.defaults.javascript; |
| 123 } else if (contentType == settings.ContentSettingsTypes.KEYGEN) { | 123 } else if (contentType == settings.ContentSettingsTypes.KEYGEN) { |
| 124 pref = this.prefs_.defaults.keygen; | 124 pref = this.prefs_.defaults.keygen; |
| 125 } else if (contentType == settings.ContentSettingsTypes.MIC) { | 125 } else if (contentType == settings.ContentSettingsTypes.MIC) { |
| 126 pref = this.prefs_.defaults.mic; | 126 pref = this.prefs_.defaults.mic; |
| 127 } else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) { | 127 } else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) { |
| 128 pref = this.prefs_.defaults.notifications; | 128 pref = this.prefs_.defaults.notifications; |
| 129 } else if (contentType == settings.ContentSettingsTypes.PDF_DOCUMENTS) { |
| 130 pref = this.prefs_.defaults.pdf_documents; |
| 129 } else if (contentType == settings.ContentSettingsTypes.POPUPS) { | 131 } else if (contentType == settings.ContentSettingsTypes.POPUPS) { |
| 130 pref = this.prefs_.defaults.popups; | 132 pref = this.prefs_.defaults.popups; |
| 131 } else if (contentType == settings.ContentSettingsTypes.PLUGINS) { | 133 } else if (contentType == settings.ContentSettingsTypes.PLUGINS) { |
| 132 pref = this.prefs_.defaults.plugins; | 134 pref = this.prefs_.defaults.plugins; |
| 133 } else if ( | 135 } else if ( |
| 134 contentType == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS) { | 136 contentType == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS) { |
| 135 pref = this.prefs_.defaults.unsandboxed_plugins; | 137 pref = this.prefs_.defaults.unsandboxed_plugins; |
| 136 } else { | 138 } else { |
| 137 console.log('getDefault received unknown category: ' + contentType); | 139 console.log('getDefault received unknown category: ' + contentType); |
| 138 } | 140 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 161 else if (contentType == settings.ContentSettingsTypes.IMAGES) | 163 else if (contentType == settings.ContentSettingsTypes.IMAGES) |
| 162 pref = this.prefs_.exceptions.images; | 164 pref = this.prefs_.exceptions.images; |
| 163 else if (contentType == settings.ContentSettingsTypes.JAVASCRIPT) | 165 else if (contentType == settings.ContentSettingsTypes.JAVASCRIPT) |
| 164 pref = this.prefs_.exceptions.javascript; | 166 pref = this.prefs_.exceptions.javascript; |
| 165 else if (contentType == settings.ContentSettingsTypes.KEYGEN) | 167 else if (contentType == settings.ContentSettingsTypes.KEYGEN) |
| 166 pref = this.prefs_.exceptions.keygen; | 168 pref = this.prefs_.exceptions.keygen; |
| 167 else if (contentType == settings.ContentSettingsTypes.MIC) | 169 else if (contentType == settings.ContentSettingsTypes.MIC) |
| 168 pref = this.prefs_.exceptions.mic; | 170 pref = this.prefs_.exceptions.mic; |
| 169 else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) | 171 else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) |
| 170 pref = this.prefs_.exceptions.notifications; | 172 pref = this.prefs_.exceptions.notifications; |
| 173 else if (contentType == settings.ContentSettingsTypes.PDF_DOCUMENTS) |
| 174 pref = this.prefs_.exceptions.pdf_documents; |
| 171 else if (contentType == settings.ContentSettingsTypes.PLUGINS) | 175 else if (contentType == settings.ContentSettingsTypes.PLUGINS) |
| 172 pref = this.prefs_.exceptions.plugins; | 176 pref = this.prefs_.exceptions.plugins; |
| 173 else if (contentType == settings.ContentSettingsTypes.POPUPS) | 177 else if (contentType == settings.ContentSettingsTypes.POPUPS) |
| 174 pref = this.prefs_.exceptions.popups; | 178 pref = this.prefs_.exceptions.popups; |
| 175 else if (contentType == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS) | 179 else if (contentType == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS) |
| 176 pref = this.prefs_.exceptions.unsandboxed_plugins; | 180 pref = this.prefs_.exceptions.unsandboxed_plugins; |
| 177 else | 181 else |
| 178 console.log('getExceptionList received unknown category: ' + contentType); | 182 console.log('getExceptionList received unknown category: ' + contentType); |
| 179 | 183 |
| 180 assert(pref != undefined, 'Pref is missing for ' + contentType); | 184 assert(pref != undefined, 'Pref is missing for ' + contentType); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 201 fetchZoomLevels: function() { | 205 fetchZoomLevels: function() { |
| 202 cr.webUIListenerCallback('onZoomLevelsChanged', this.zoomList_); | 206 cr.webUIListenerCallback('onZoomLevelsChanged', this.zoomList_); |
| 203 this.methodCalled('fetchZoomLevels'); | 207 this.methodCalled('fetchZoomLevels'); |
| 204 }, | 208 }, |
| 205 | 209 |
| 206 /** @override */ | 210 /** @override */ |
| 207 removeZoomLevel: function(host) { | 211 removeZoomLevel: function(host) { |
| 208 this.methodCalled('removeZoomLevel', [host]); | 212 this.methodCalled('removeZoomLevel', [host]); |
| 209 }, | 213 }, |
| 210 }; | 214 }; |
| OLD | NEW |