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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 getDefaultValueForContentType: function(contentType) {}, | 94 getDefaultValueForContentType: function(contentType) {}, |
95 | 95 |
96 /** | 96 /** |
97 * Gets the exceptions (site list) for a particular category. | 97 * Gets the exceptions (site list) for a particular category. |
98 * @param {string} contentType The name of the category to query. | 98 * @param {string} contentType The name of the category to query. |
99 * @return {Promise<Array<SiteException>>} | 99 * @return {Promise<Array<SiteException>>} |
100 */ | 100 */ |
101 getExceptionList: function(contentType) {}, | 101 getExceptionList: function(contentType) {}, |
102 | 102 |
103 /** | 103 /** |
| 104 * Gets the exception details for a particular site. |
| 105 * @param {string} site The name of the site. |
| 106 * @return {Promise<SiteException>} |
| 107 */ |
| 108 getSiteDetails: function(site) {}, |
| 109 |
| 110 /** |
104 * Resets the category permission for a given origin (expressed as primary | 111 * Resets the category permission for a given origin (expressed as primary |
105 * and secondary patterns). | 112 * and secondary patterns). |
106 * @param {string} primaryPattern The origin to change (primary pattern). | 113 * @param {string} primaryPattern The origin to change (primary pattern). |
107 * @param {string} secondaryPattern The embedding origin to change | 114 * @param {string} secondaryPattern The embedding origin to change |
108 * (secondary pattern). | 115 * (secondary pattern). |
109 * @param {string} contentType The name of the category to reset. | 116 * @param {string} contentType The name of the category to reset. |
110 * @param {boolean} incognito Whether this applies only to a current | 117 * @param {boolean} incognito Whether this applies only to a current |
111 * incognito session exception. | 118 * incognito session exception. |
112 */ | 119 */ |
113 resetCategoryPermissionForOrigin: function( | 120 resetCategoryPermissionForOrigin: function( |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 getDefaultValueForContentType: function(contentType) { | 265 getDefaultValueForContentType: function(contentType) { |
259 return cr.sendWithPromise('getDefaultValueForContentType', contentType); | 266 return cr.sendWithPromise('getDefaultValueForContentType', contentType); |
260 }, | 267 }, |
261 | 268 |
262 /** @override */ | 269 /** @override */ |
263 getExceptionList: function(contentType) { | 270 getExceptionList: function(contentType) { |
264 return cr.sendWithPromise('getExceptionList', contentType); | 271 return cr.sendWithPromise('getExceptionList', contentType); |
265 }, | 272 }, |
266 | 273 |
267 /** @override */ | 274 /** @override */ |
| 275 getSiteDetails: function(site) { |
| 276 return cr.sendWithPromise('getSiteDetails', site); |
| 277 }, |
| 278 |
| 279 /** @override */ |
268 resetCategoryPermissionForOrigin: function( | 280 resetCategoryPermissionForOrigin: function( |
269 primaryPattern, secondaryPattern, contentType, incognito) { | 281 primaryPattern, secondaryPattern, contentType, incognito) { |
270 chrome.send('resetCategoryPermissionForOrigin', | 282 chrome.send('resetCategoryPermissionForOrigin', |
271 [primaryPattern, secondaryPattern, contentType, incognito]); | 283 [primaryPattern, secondaryPattern, contentType, incognito]); |
272 }, | 284 }, |
273 | 285 |
274 /** @override */ | 286 /** @override */ |
275 setCategoryPermissionForOrigin: function( | 287 setCategoryPermissionForOrigin: function( |
276 primaryPattern, secondaryPattern, contentType, value, incognito) { | 288 primaryPattern, secondaryPattern, contentType, value, incognito) { |
277 chrome.send('setCategoryPermissionForOrigin', | 289 chrome.send('setCategoryPermissionForOrigin', |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 removeZoomLevel: function(host) { | 368 removeZoomLevel: function(host) { |
357 chrome.send('removeZoomLevel', [host]); | 369 chrome.send('removeZoomLevel', [host]); |
358 }, | 370 }, |
359 }; | 371 }; |
360 | 372 |
361 return { | 373 return { |
362 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, | 374 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, |
363 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, | 375 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, |
364 }; | 376 }; |
365 }); | 377 }); |
OLD | NEW |