| 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 A helper object used from the "Site Settings" section to | 6 * @fileoverview A helper object used from the "Site Settings" section to |
| 7 * interact with the content settings prefs. | 7 * interact with the content settings prefs. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 * @param {string} type The type to look up. | 102 * @param {string} type The type to look up. |
| 103 */ | 103 */ |
| 104 getDefaultCaptureDevices: function(type) {}, | 104 getDefaultCaptureDevices: function(type) {}, |
| 105 | 105 |
| 106 /** | 106 /** |
| 107 * Sets a default devices for a given type of media. | 107 * Sets a default devices for a given type of media. |
| 108 * @param {string} type The type of media to configure. | 108 * @param {string} type The type of media to configure. |
| 109 * @param {string} defaultValue The id of the media device to set. | 109 * @param {string} defaultValue The id of the media device to set. |
| 110 */ | 110 */ |
| 111 setDefaultCaptureDevice: function(type, defaultValue) {}, | 111 setDefaultCaptureDevice: function(type, defaultValue) {}, |
| 112 |
| 113 /** |
| 114 * Initializes the protocol handler list. List is returned through JS calls |
| 115 * to setHandlersEnabled, setProtocolHandlers & setIgnoredProtocolHandlers. |
| 116 */ |
| 117 initializeProtocolHandlerList: function() {}, |
| 118 |
| 119 /** |
| 120 * Enables or disables the ability for sites to ask to become the default |
| 121 * protocol handlers. |
| 122 * @param {boolean} enabled Whether sites can ask to become default. |
| 123 */ |
| 124 setProtocolHandlerDefault: function(enabled) {}, |
| 125 |
| 126 /** |
| 127 * Sets a certain url as default for a given protocol handler. |
| 128 * @param {string} protocol The protocol to set a default for. |
| 129 * @param {string} url The url to use as the default. |
| 130 */ |
| 131 setProtocolDefault: function(protocol, url) {}, |
| 132 |
| 133 /** |
| 134 * Deletes a certain protocol handler by url. |
| 135 * @param {string} protocol The protocol to delete the url from. |
| 136 * @param {string} url The url to delete. |
| 137 */ |
| 138 removeProtocolHandler: function(protocol, url) {}, |
| 112 }; | 139 }; |
| 113 | 140 |
| 114 /** | 141 /** |
| 115 * @constructor | 142 * @constructor |
| 116 * @implements {settings.SiteSettingsPrefsBrowserProxy} | 143 * @implements {settings.SiteSettingsPrefsBrowserProxy} |
| 117 */ | 144 */ |
| 118 function SiteSettingsPrefsBrowserProxyImpl() {} | 145 function SiteSettingsPrefsBrowserProxyImpl() {} |
| 119 | 146 |
| 120 // The singleton instance_ is replaced with a test version of this wrapper | 147 // The singleton instance_ is replaced with a test version of this wrapper |
| 121 // during testing. | 148 // during testing. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 185 |
| 159 /** @override */ | 186 /** @override */ |
| 160 getDefaultCaptureDevices: function(type) { | 187 getDefaultCaptureDevices: function(type) { |
| 161 chrome.send('getDefaultCaptureDevices', [type]); | 188 chrome.send('getDefaultCaptureDevices', [type]); |
| 162 }, | 189 }, |
| 163 | 190 |
| 164 /** @override */ | 191 /** @override */ |
| 165 setDefaultCaptureDevice: function(type, defaultValue) { | 192 setDefaultCaptureDevice: function(type, defaultValue) { |
| 166 chrome.send('setDefaultCaptureDevice', [type, defaultValue]); | 193 chrome.send('setDefaultCaptureDevice', [type, defaultValue]); |
| 167 }, | 194 }, |
| 195 |
| 196 /** @override */ |
| 197 initializeProtocolHandlerList: function() { |
| 198 chrome.send('initializeProtocolHandlerList'); |
| 199 }, |
| 200 |
| 201 /** @override */ |
| 202 setProtocolHandlerDefault: function(enabled) { |
| 203 chrome.send('setHandlersEnabled', [enabled]); |
| 204 }, |
| 205 |
| 206 /** @override */ |
| 207 setProtocolDefault: function(protocol, url) { |
| 208 chrome.send('setDefault', [[protocol, url]]); |
| 209 }, |
| 210 |
| 211 /** @override */ |
| 212 removeProtocolHandler: function(protocol, url) { |
| 213 chrome.send('removeHandler', [[protocol, url]]); |
| 214 }, |
| 168 }; | 215 }; |
| 169 | 216 |
| 170 return { | 217 return { |
| 171 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, | 218 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, |
| 172 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, | 219 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, |
| 173 }; | 220 }; |
| 174 }); | 221 }); |
| OLD | NEW |