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

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: 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 494cd1e0b1fcbeea65b20539acadff34bf913721..3a319ffa4fa909d8e2c8059066e59483c49ad8d1 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
@@ -109,6 +109,33 @@ cr.define('settings', function() {
* @param {string} defaultValue The id of the media device to set.
*/
setDefaultCaptureDevice: function(type, defaultValue) {},
+
+ /**
+ * 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) {},
};
/**
@@ -165,6 +192,26 @@ cr.define('settings', function() {
setDefaultCaptureDevice: function(type, defaultValue) {
chrome.send('setDefaultCaptureDevice', [type, defaultValue]);
},
+
+ /** @override */
+ 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