Chromium Code Reviews| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 | 202 |
| 203 /** | 203 /** |
| 204 * Removes all cookies. | 204 * Removes all cookies. |
| 205 * @return {!Promise<!CookieList>} Returns the up to date | 205 * @return {!Promise<!CookieList>} Returns the up to date |
| 206 * cookie list once deletion is complete (empty list). | 206 * cookie list once deletion is complete (empty list). |
| 207 */ | 207 */ |
| 208 removeAllCookies: function() {}, | 208 removeAllCookies: function() {}, |
| 209 | 209 |
| 210 /** | 210 /** |
| 211 * Initializes the protocol handler list. List is returned through JS calls | 211 * Initializes the protocol handler list. List is returned through JS calls |
| 212 * to setHandlersEnabled, setProtocolHandlers & setIgnoredProtocolHandlers. | 212 * to 'setHandlersEnabled', 'setProtocolHandlers', and |
|
dpapad
2016/12/22 19:39:02
Nit (optional): Looking at the C++ handler, setPro
dschuyler
2016/12/22 19:58:15
Seems reasonable - let's look at that further in a
| |
| 213 * 'setIgnoredProtocolHandler'. | |
|
dschuyler
2016/12/22 02:00:05
I like the quotes because it helps me see them as
dpapad
2016/12/22 19:39:02
Nit: I think is more common in Chromium comments t
dschuyler
2016/12/22 19:58:15
Yeah, I've seen (and use) that for code. What abou
dpapad
2016/12/22 20:08:35
The current comment phrasing makes it sound that "
dschuyler
2016/12/22 21:54:39
Done.
| |
| 213 */ | 214 */ |
| 214 initializeProtocolHandlerList: function() {}, | 215 initializeProtocolHandlerList: function() {}, |
| 215 | 216 |
| 216 /** | 217 /** |
| 218 * Initializes the protocol handler so that updates are sent. The | |
| 219 * 'setHandlersEnabled' update will be sent immediately and updates may | |
| 220 * follow. | |
| 221 * | |
| 222 * There's no need to call both initializeProtocolHandlerList | |
| 223 * and initializeProtocolHandlerUpdates. The *Updates version is lighter | |
| 224 * because it doesn't send the list. | |
|
dschuyler
2016/12/22 02:00:05
I could easily re-arrange this so that they are in
dpapad
2016/12/22 19:39:02
IIUC initializeProtocolHandlerList and initializeP
dschuyler
2016/12/22 19:58:15
It's not that one sends the initial state and one
dpapad
2016/12/22 20:08:35
Ack.
If there are two bools needed, then my under
dschuyler
2016/12/22 21:54:39
Sounds like a good thing to get into the style gui
| |
| 225 */ | |
| 226 initializeProtocolHandlerUpdates: function() {}, | |
| 227 | |
| 228 /** | |
| 217 * Enables or disables the ability for sites to ask to become the default | 229 * Enables or disables the ability for sites to ask to become the default |
| 218 * protocol handlers. | 230 * protocol handlers. |
| 219 * @param {boolean} enabled Whether sites can ask to become default. | 231 * @param {boolean} enabled Whether sites can ask to become default. |
| 220 */ | 232 */ |
| 221 setProtocolHandlerDefault: function(enabled) {}, | 233 setProtocolHandlerDefault: function(enabled) {}, |
| 222 | 234 |
| 223 /** | 235 /** |
| 224 * Sets a certain url as default for a given protocol handler. | 236 * Sets a certain url as default for a given protocol handler. |
| 225 * @param {string} protocol The protocol to set a default for. | 237 * @param {string} protocol The protocol to set a default for. |
| 226 * @param {string} url The url to use as the default. | 238 * @param {string} url The url to use as the default. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 351 | 363 |
| 352 /** @override */ | 364 /** @override */ |
| 353 removeAllCookies: function() { | 365 removeAllCookies: function() { |
| 354 return cr.sendWithPromise('removeAllCookies'); | 366 return cr.sendWithPromise('removeAllCookies'); |
| 355 }, | 367 }, |
| 356 | 368 |
| 357 initializeProtocolHandlerList: function() { | 369 initializeProtocolHandlerList: function() { |
| 358 chrome.send('initializeProtocolHandlerList'); | 370 chrome.send('initializeProtocolHandlerList'); |
| 359 }, | 371 }, |
| 360 | 372 |
| 373 initializeProtocolHandlerUpdates: function() { | |
| 374 chrome.send('initializeProtocolHandlerUpdates'); | |
| 375 }, | |
| 376 | |
| 361 /** @override */ | 377 /** @override */ |
| 362 setProtocolHandlerDefault: function(enabled) { | 378 setProtocolHandlerDefault: function(enabled) { |
| 363 chrome.send('setHandlersEnabled', [enabled]); | 379 chrome.send('setHandlersEnabled', [enabled]); |
| 364 }, | 380 }, |
| 365 | 381 |
| 366 /** @override */ | 382 /** @override */ |
| 367 setProtocolDefault: function(protocol, url) { | 383 setProtocolDefault: function(protocol, url) { |
| 368 chrome.send('setDefault', [[protocol, url]]); | 384 chrome.send('setDefault', [[protocol, url]]); |
| 369 }, | 385 }, |
| 370 | 386 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 397 removeZoomLevel: function(host) { | 413 removeZoomLevel: function(host) { |
| 398 chrome.send('removeZoomLevel', [host]); | 414 chrome.send('removeZoomLevel', [host]); |
| 399 }, | 415 }, |
| 400 }; | 416 }; |
| 401 | 417 |
| 402 return { | 418 return { |
| 403 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, | 419 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, |
| 404 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, | 420 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, |
| 405 }; | 421 }; |
| 406 }); | 422 }); |
| OLD | NEW |