| 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 /** |
| 11 * The handler will send a police source that is similar, but not exactly the |
| 12 * same as a ControlledBy value. If the ContentSettingProvider is omitted it |
| 13 * should be treated as 'default'. |
| 14 * @enum {string} |
| 15 */ |
| 16 var ContentSettingProvider = { |
| 17 EXTENSION: 'extension', |
| 18 PREFERENCE: 'preference', |
| 19 }; |
| 20 |
| 21 /** |
| 11 * @typedef {{embeddingOrigin: string, | 22 * @typedef {{embeddingOrigin: string, |
| 12 * embeddingDisplayName: string, | 23 * embeddingDisplayName: string, |
| 13 * incognito: boolean, | 24 * incognito: boolean, |
| 14 * origin: string, | 25 * origin: string, |
| 15 * displayName: string, | 26 * displayName: string, |
| 16 * setting: string, | 27 * setting: string, |
| 17 * source: string}} | 28 * source: string}} |
| 18 */ | 29 */ |
| 19 var SiteException; | 30 var SiteException; |
| 20 | 31 |
| 21 /** | 32 /** |
| 22 * @typedef {{location: string, | 33 * @typedef {{location: string, |
| 23 * notifications: string}} | 34 * notifications: string}} |
| 24 */ | 35 */ |
| 25 var CategoryDefaultsPref; | 36 var CategoryDefaultsPref; |
| 26 | 37 |
| 27 /** | 38 /** |
| 39 * @typedef {{setting: string, |
| 40 * source: ContentSettingProvider}} |
| 41 */ |
| 42 var DefaultContentSetting; |
| 43 |
| 44 /** |
| 28 * @typedef {{location: Array<SiteException>, | 45 * @typedef {{location: Array<SiteException>, |
| 29 * notifications: Array<SiteException>}} | 46 * notifications: Array<SiteException>}} |
| 30 */ | 47 */ |
| 31 var ExceptionListPref; | 48 var ExceptionListPref; |
| 32 | 49 |
| 33 /** | 50 /** |
| 34 * @typedef {{defaults: CategoryDefaultsPref, | 51 * @typedef {{defaults: CategoryDefaultsPref, |
| 35 * exceptions: ExceptionListPref}} | 52 * exceptions: ExceptionListPref}} |
| 36 */ | 53 */ |
| 37 var SiteSettingsPref; | 54 var SiteSettingsPref; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 /** | 106 /** |
| 90 * Gets the cookie details for a particular site. | 107 * Gets the cookie details for a particular site. |
| 91 * @param {string} site The name of the site. | 108 * @param {string} site The name of the site. |
| 92 * @return {!Promise<!CookieDataSummaryItem>} | 109 * @return {!Promise<!CookieDataSummaryItem>} |
| 93 */ | 110 */ |
| 94 getCookieDetails: function(site) {}, | 111 getCookieDetails: function(site) {}, |
| 95 | 112 |
| 96 /** | 113 /** |
| 97 * Gets the default value for a site settings category. | 114 * Gets the default value for a site settings category. |
| 98 * @param {string} contentType The name of the category to query. | 115 * @param {string} contentType The name of the category to query. |
| 99 * @return {!Promise<string>} The string value of the default setting. | 116 * @return {!Promise<!DefaultContentSetting>} |
| 100 */ | 117 */ |
| 101 getDefaultValueForContentType: function(contentType) {}, | 118 getDefaultValueForContentType: function(contentType) {}, |
| 102 | 119 |
| 103 /** | 120 /** |
| 104 * Gets the exceptions (site list) for a particular category. | 121 * Gets the exceptions (site list) for a particular category. |
| 105 * @param {string} contentType The name of the category to query. | 122 * @param {string} contentType The name of the category to query. |
| 106 * @return {!Promise<!Array<!SiteException>>} | 123 * @return {!Promise<!Array<!SiteException>>} |
| 107 */ | 124 */ |
| 108 getExceptionList: function(contentType) {}, | 125 getExceptionList: function(contentType) {}, |
| 109 | 126 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 removeZoomLevel: function(host) { | 397 removeZoomLevel: function(host) { |
| 381 chrome.send('removeZoomLevel', [host]); | 398 chrome.send('removeZoomLevel', [host]); |
| 382 }, | 399 }, |
| 383 }; | 400 }; |
| 384 | 401 |
| 385 return { | 402 return { |
| 386 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, | 403 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, |
| 387 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, | 404 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, |
| 388 }; | 405 }; |
| 389 }); | 406 }); |
| OLD | NEW |