1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 "namespace": "contentSettings",
8 "description": "Use the <code>chrome.contentSettings</code> API to change settings that control whether websites can use features such as cookies, JavaScript, and plugins. More generally speaking, content settings allow you to customize Chrome's behavior on a per-site basis instead of globally.",
10 "generate_type_functions": true
14 "id": "ResourceIdentifier",
19 "description": "The resource identifier for the given content type."
24 "description": "A human readable description of the resource."
27 "description": "The only content type using resource identifiers is $(ref:contentSettings.plugins). For more information, see <a href=\"contentSettings#resource-identifiers\">Resource Identifiers</a>."
32 "enum": ["regular", "incognito_session_only"],
33 "description": "The scope of the ContentSetting. One of<br><var>regular</var>: setting for regular profile (which is inherited by the incognito profile if not overridden elsewhere),<br><var>incognito_session_only</var>: setting for incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular settings)."
36 "id": "ContentSetting",
37 "js_module": "ContentSetting",
43 "description": "Clear all content setting rules set by this extension.",
52 "description": "Where to clear the setting (default: regular)."
67 "description": "Gets the current content setting for a given pair of URLs.",
75 "description": "The primary URL for which the content setting should be retrieved. Note that the meaning of a primary URL depends on the content type."
79 "description": "The secondary URL for which the content setting should be retrieved. Defaults to the primary URL. Note that the meaning of a secondary URL depends on the content type, and not all content types use secondary URLs.",
82 "resourceIdentifier": {
83 "$ref": "ResourceIdentifier",
85 "description": "A more specific identifier of the type of content for which the settings should be retrieved."
90 "description": "Whether to check the content settings for an incognito session. (default false)"
104 "description": "The content setting. See the description of the individual ContentSetting objects for the possible values."
115 "description": "Applies a new content setting rule.",
123 "description": "The pattern for the primary URL. For details on the format of a pattern, see <a href='contentSettings#patterns'>Content Setting Patterns</a>."
125 "secondaryPattern": {
127 "description": "The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see <a href='contentSettings#patterns'>Content Setting Patterns</a>.",
130 "resourceIdentifier": {
131 "$ref": "ResourceIdentifier",
133 "description": "The resource identifier for the content type."
137 "description": "The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values."
142 "description": "Where to set the setting (default: regular)."
155 "name": "getResourceIdentifiers",
164 "name": "resourceIdentifiers",
166 "description": "A list of resource identifiers for this content type, or <var>undefined</var> if this content type does not use resource identifiers.",
169 "$ref": "ResourceIdentifier"
179 "id": "CookiesContentSetting",
181 "enum": ["allow", "block", "session_only"]
184 "id": "ImagesContentSetting",
186 "enum": ["allow", "block"]
189 "id": "JavascriptContentSetting",
191 "enum": ["allow", "block"]
194 "id": "LocationContentSetting",
196 "enum": ["allow", "block", "ask"]
199 "id": "PluginsContentSetting",
201 "enum": ["allow", "block", "detect_important_content"]
204 "id": "PopupsContentSetting",
206 "enum": ["allow", "block"]
209 "id": "NotificationsContentSetting",
211 "enum": ["allow", "block", "ask"]
214 "id": "FullscreenContentSetting",
216 "enum": ["allow", "ask"]
219 "id": "MouselockContentSetting",
221 "enum": ["allow", "block", "ask"]
224 "id": "PpapiBrokerContentSetting",
226 "enum": ["allow", "block", "ask"]
229 "id": "MultipleAutomaticDownloadsContentSetting",
231 "enum": ["allow", "block", "ask"]
236 "$ref": "ContentSetting",
237 "description": "Whether to allow cookies and other local data to be set by websites. One of<br><var>allow</var>: Accept cookies,<br><var>block</var>: Block cookies,<br><var>session_only</var>: Accept cookies only for the current session. <br>Default is <var>allow</var>.<br>The primary URL is the URL representing the cookie origin. The secondary URL is the URL of the top-level frame.",
240 {"$ref":"CookiesContentSetting"}
244 "$ref": "ContentSetting",
245 "description": "Whether to show images. One of<br><var>allow</var>: Show images,<br><var>block</var>: Don't show images. <br>Default is <var>allow</var>.<br>The primary URL is the URL of the top-level frame. The secondary URL is the URL of the image.",
248 {"$ref":"ImagesContentSetting"}
252 "$ref": "ContentSetting",
253 "description": "Whether to run JavaScript. One of<br><var>allow</var>: Run JavaScript,<br><var>block</var>: Don't run JavaScript. <br>Default is <var>allow</var>.<br>The primary URL is the URL of the top-level frame. The secondary URL is not used.",
256 {"$ref":"JavascriptContentSetting"}
260 "$ref": "ContentSetting",
261 "description": "Whether to allow Geolocation. One of <br><var>allow</var>: Allow sites to track your physical location,<br><var>block</var>: Don't allow sites to track your physical location,<br><var>ask</var>: Ask before allowing sites to track your physical location. <br>Default is <var>ask</var>.<br>The primary URL is the URL of the document which requested location data. The secondary URL is the URL of the top-level frame (which may or may not differ from the requesting URL).",
264 {"$ref":"LocationContentSetting"}
268 "$ref": "ContentSetting",
269 "description": "Whether to run plugins. One of<br><var>allow</var>: Run plugins automatically,<br><var>block</var>: Don't run plugins automatically,<br><var>detect_important_content</var>: Only run automatically those plugins that are detected as the website's main content. <br>Default is <var>allow</var>.<br>The primary URL is the URL of the top-level frame. The secondary URL is not used.",
272 {"$ref":"PluginsContentSetting"}
276 "$ref": "ContentSetting",
277 "description": "Whether to allow sites to show pop-ups. One of<br><var>allow</var>: Allow sites to show pop-ups,<br><var>block</var>: Don't allow sites to show pop-ups. <br>Default is <var>block</var>.<br>The primary URL is the URL of the top-level frame. The secondary URL is not used.",
280 {"$ref":"PopupsContentSetting"}
284 "$ref": "ContentSetting",
285 "description": "Whether to allow sites to show desktop notifications. One of<br><var>allow</var>: Allow sites to show desktop notifications,<br><var>block</var>: Don't allow sites to show desktop notifications,<br><var>ask</var>: Ask when a site wants to show desktop notifications. <br>Default is <var>ask</var>.<br>The primary URL is the URL of the document which wants to show the notification. The secondary URL is not used.",
288 {"$ref":"NotificationsContentSetting"}
292 "$ref": "ContentSetting",
293 "description": "Whether to allow sites to toggle the fullscreen mode. One of<br><var>allow</var>: Allow sites to toggle the fullscreen mode,<br><var>ask</var>: Ask when a site wants to toggle the fullscreen mode. <br>Default is <var>ask</var>.<br>The primary URL is the URL of the document which requested to toggle the fullscreen mode. The secondary URL is the URL of the top-level frame (which may or may not differ from the requesting URL).",
296 {"$ref":"FullscreenContentSetting"}
300 "$ref": "ContentSetting",
301 "description": "Whether to allow sites to disable the mouse cursor. One of <br><var>allow</var>: Allow sites to disable the mouse cursor,<br><var>block</var>: Don't allow sites to disable the mouse cursor,<br><var>ask</var>: Ask when a site wants to disable the mouse cursor. <br>Default is <var>ask</var>.<br>The primary URL is the URL of the top-level frame. The secondary URL is not used.",
304 {"$ref":"MouselockContentSetting"}
307 "unsandboxedPlugins": {
308 "$ref": "ContentSetting",
309 "description": "Whether to allow sites to run plugins unsandboxed. One of <br><var>allow</var>: Allow sites to run plugins unsandboxed,<br><var>block</var>: Don't allow sites to run plugins unsandboxed,<br><var>ask</var>: Ask when a site wants to run a plugin unsandboxed. <br>Default is <var>ask</var>.<br>The primary URL is the URL of the top-level frame. The secondary URL is not used.",
312 {"$ref":"PpapiBrokerContentSetting"}
315 "automaticDownloads": {
316 "$ref": "ContentSetting",
317 "description": "Whether to allow sites to download multiple files automatically. One of <br><var>allow</var>: Allow sites to download multiple files automatically,<br><var>block</var>: Don't allow sites to download multiple files automatically,<br><var>ask</var>: Ask when a site wants to download files automatically after the first file. <br>Default is <var>ask</var>.<br>The primary URL is the URL of the top-level frame. The secondary URL is not used.",
319 "automatic-downloads",
320 {"$ref":"MultipleAutomaticDownloadsContentSetting"}