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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 }, | 319 }, |
320 | 320 |
321 /** @override */ | 321 /** @override */ |
322 getSiteDetails: function(site) { | 322 getSiteDetails: function(site) { |
323 return cr.sendWithPromise('getSiteDetails', site); | 323 return cr.sendWithPromise('getSiteDetails', site); |
324 }, | 324 }, |
325 | 325 |
326 /** @override */ | 326 /** @override */ |
327 resetCategoryPermissionForOrigin: function( | 327 resetCategoryPermissionForOrigin: function( |
328 primaryPattern, secondaryPattern, contentType, incognito) { | 328 primaryPattern, secondaryPattern, contentType, incognito) { |
329 chrome.send('resetCategoryPermissionForOrigin', | 329 chrome.send( |
| 330 'resetCategoryPermissionForOrigin', |
330 [primaryPattern, secondaryPattern, contentType, incognito]); | 331 [primaryPattern, secondaryPattern, contentType, incognito]); |
331 }, | 332 }, |
332 | 333 |
333 /** @override */ | 334 /** @override */ |
334 setCategoryPermissionForOrigin: function( | 335 setCategoryPermissionForOrigin: function( |
335 primaryPattern, secondaryPattern, contentType, value, incognito) { | 336 primaryPattern, secondaryPattern, contentType, value, incognito) { |
336 chrome.send('setCategoryPermissionForOrigin', | 337 // TODO(dschuyler): It may be incorrect for JS to send the embeddingOrigin |
337 [primaryPattern, secondaryPattern, contentType, value, incognito]); | 338 // pattern. Look into removing this parameter from site_settings_handler. |
| 339 // Ignoring the |secondaryPattern| and using '' instead is a quick-fix. |
| 340 chrome.send( |
| 341 'setCategoryPermissionForOrigin', |
| 342 [primaryPattern, '', contentType, value, incognito]); |
338 }, | 343 }, |
339 | 344 |
340 /** @override */ | 345 /** @override */ |
341 isPatternValid: function(pattern) { | 346 isPatternValid: function(pattern) { |
342 return cr.sendWithPromise('isPatternValid', pattern); | 347 return cr.sendWithPromise('isPatternValid', pattern); |
343 }, | 348 }, |
344 | 349 |
345 /** @override */ | 350 /** @override */ |
346 getDefaultCaptureDevices: function(type) { | 351 getDefaultCaptureDevices: function(type) { |
347 chrome.send('getDefaultCaptureDevices', [type]); | 352 chrome.send('getDefaultCaptureDevices', [type]); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 removeZoomLevel: function(host) { | 426 removeZoomLevel: function(host) { |
422 chrome.send('removeZoomLevel', [host]); | 427 chrome.send('removeZoomLevel', [host]); |
423 }, | 428 }, |
424 }; | 429 }; |
425 | 430 |
426 return { | 431 return { |
427 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, | 432 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, |
428 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, | 433 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, |
429 }; | 434 }; |
430 }); | 435 }); |
OLD | NEW |