Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7057)

Unified Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js

Issue 2131953002: Site Settings Desktop: Implement protocol handler section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
index 99af3cd0a3695b84f736eef80d51300a4070ce4b..c944ccdcbb62ce21287b5b680e13d26adcfbf7b1 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
+++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
@@ -127,6 +127,33 @@ cr.define('settings', function() {
* @param {string} path The path to the parent cookie.
*/
removeCookie: function(path) {},
+
+ /**
+ * Initializes the protocol handler list. List is returned through JS calls
+ * to setHandlersEnabled, setProtocolHandlers & setIgnoredProtocolHandlers.
+ */
+ initializeProtocolHandlerList: function() {},
+
+ /**
+ * Enables or disables the ability for sites to ask to become the default
+ * protocol handlers.
+ * @param {boolean} enabled Whether sites can ask to become default.
+ */
+ setProtocolHandlerDefault: function(enabled) {},
+
+ /**
+ * Sets a certain url as default for a given protocol handler.
+ * @param {string} protocol The protocol to set a default for.
+ * @param {string} url The url to use as the default.
+ */
+ setProtocolDefault: function(protocol, url) {},
+
+ /**
+ * Deletes a certain protocol handler by url.
+ * @param {string} protocol The protocol to delete the url from.
+ * @param {string} url The url to delete.
+ */
+ removeProtocolHandler: function(protocol, url) {},
};
/**
@@ -197,7 +224,26 @@ cr.define('settings', function() {
/** @override */
removeCookie: function(path) {
chrome.send('removeCookie', [path]);
- }
+ },
+
+ initializeProtocolHandlerList: function() {
+ chrome.send('initializeProtocolHandlerList');
+ },
+
+ /** @override */
+ setProtocolHandlerDefault: function(enabled) {
+ chrome.send('setHandlersEnabled', [enabled]);
+ },
+
+ /** @override */
+ setProtocolDefault: function(protocol, url) {
+ chrome.send('setDefault', [[protocol, url]]);
+ },
+
+ /** @override */
+ removeProtocolHandler: function(protocol, url) {
+ chrome.send('removeHandler', [[protocol, url]]);
+ },
};
return {

Powered by Google App Engine
This is Rietveld 408576698