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

Side by Side 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 unified diff | Download patch
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 * call to loadChildren. 120 * call to loadChildren.
121 * @param {string} path The path to the parent cookie. 121 * @param {string} path The path to the parent cookie.
122 */ 122 */
123 loadCookieChildren: function(path) {}, 123 loadCookieChildren: function(path) {},
124 124
125 /** 125 /**
126 * Removes a given cookie. 126 * Removes a given cookie.
127 * @param {string} path The path to the parent cookie. 127 * @param {string} path The path to the parent cookie.
128 */ 128 */
129 removeCookie: function(path) {}, 129 removeCookie: function(path) {},
130
131 /**
132 * Initializes the protocol handler list. List is returned through JS calls
133 * to setHandlersEnabled, setProtocolHandlers & setIgnoredProtocolHandlers.
134 */
135 initializeProtocolHandlerList: function() {},
136
137 /**
138 * Enables or disables the ability for sites to ask to become the default
139 * protocol handlers.
140 * @param {boolean} enabled Whether sites can ask to become default.
141 */
142 setProtocolHandlerDefault: function(enabled) {},
143
144 /**
145 * Sets a certain url as default for a given protocol handler.
146 * @param {string} protocol The protocol to set a default for.
147 * @param {string} url The url to use as the default.
148 */
149 setProtocolDefault: function(protocol, url) {},
150
151 /**
152 * Deletes a certain protocol handler by url.
153 * @param {string} protocol The protocol to delete the url from.
154 * @param {string} url The url to delete.
155 */
156 removeProtocolHandler: function(protocol, url) {},
130 }; 157 };
131 158
132 /** 159 /**
133 * @constructor 160 * @constructor
134 * @implements {settings.SiteSettingsPrefsBrowserProxy} 161 * @implements {settings.SiteSettingsPrefsBrowserProxy}
135 */ 162 */
136 function SiteSettingsPrefsBrowserProxyImpl() {} 163 function SiteSettingsPrefsBrowserProxyImpl() {}
137 164
138 // The singleton instance_ is replaced with a test version of this wrapper 165 // The singleton instance_ is replaced with a test version of this wrapper
139 // during testing. 166 // during testing.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 }, 217 },
191 218
192 /** @override */ 219 /** @override */
193 loadCookieChildren: function(path) { 220 loadCookieChildren: function(path) {
194 chrome.send('loadCookie', [path]); 221 chrome.send('loadCookie', [path]);
195 }, 222 },
196 223
197 /** @override */ 224 /** @override */
198 removeCookie: function(path) { 225 removeCookie: function(path) {
199 chrome.send('removeCookie', [path]); 226 chrome.send('removeCookie', [path]);
200 } 227 },
228
229 initializeProtocolHandlerList: function() {
230 chrome.send('initializeProtocolHandlerList');
231 },
232
233 /** @override */
234 setProtocolHandlerDefault: function(enabled) {
235 chrome.send('setHandlersEnabled', [enabled]);
236 },
237
238 /** @override */
239 setProtocolDefault: function(protocol, url) {
240 chrome.send('setDefault', [[protocol, url]]);
241 },
242
243 /** @override */
244 removeProtocolHandler: function(protocol, url) {
245 chrome.send('removeHandler', [[protocol, url]]);
246 },
201 }; 247 };
202 248
203 return { 249 return {
204 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, 250 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy,
205 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, 251 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl,
206 }; 252 };
207 }); 253 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698