| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 { | 6 { |
| 7 "namespace": "contentSettings", | 7 "namespace": "contentSettings", |
| 8 "description": "Use the <code>chrome.contentSettings</code> API to change se
ttings that control whether websites can use features such as cookies, JavaScrip
t, and plug-ins. More generally speaking, content settings allow you to customiz
e Chrome's behavior on a per-site basis instead of globally.", | 8 "description": "Use the <code>chrome.contentSettings</code> API to change se
ttings that control whether websites can use features such as cookies, JavaScrip
t, and plug-ins. More generally speaking, content settings allow you to customiz
e Chrome's behavior on a per-site basis instead of globally.", |
| 9 "compiler_options": { | 9 "compiler_options": { |
| 10 "generate_type_functions": true | 10 "generate_type_functions": true |
| 11 }, | 11 }, |
| 12 "types": [ | 12 "types": [ |
| 13 { | 13 { |
| 14 "id": "ResourceIdentifier", | 14 "id": "ResourceIdentifier", |
| 15 "type": "object", | 15 "type": "object", |
| 16 "properties": { | 16 "properties": { |
| 17 "id": { | 17 "id": { |
| 18 "type": "string", | 18 "type": "string", |
| 19 "description": "The resource identifier for the given content type." | 19 "description": "The resource identifier for the given content type." |
| 20 }, | 20 }, |
| 21 "description": { | 21 "description": { |
| 22 "type": "string", | 22 "type": "string", |
| 23 "optional": true, | 23 "optional": true, |
| 24 "description": "A human readable description of the resource." | 24 "description": "A human readable description of the resource." |
| 25 } | 25 } |
| 26 }, | 26 }, |
| 27 "description": "The only content type using resource identifiers is $(re
f:contentSettings.plugins). For more information, see <a href=\"contentSettings.
html#resource-identifiers\">Resource Identifiers</a>." | 27 "description": "The only content type using resource identifiers is $(re
f:contentSettings.plugins). For more information, see <a href=\"contentSettings#
resource-identifiers\">Resource Identifiers</a>." |
| 28 }, | 28 }, |
| 29 { | 29 { |
| 30 "id": "ContentSetting", | 30 "id": "ContentSetting", |
| 31 "js_module": "ContentSetting", | 31 "js_module": "ContentSetting", |
| 32 "type": "object", | 32 "type": "object", |
| 33 "functions": [ | 33 "functions": [ |
| 34 { | 34 { |
| 35 "name": "clear", | 35 "name": "clear", |
| 36 "type": "function", | 36 "type": "function", |
| 37 "description": "Clear all content setting rules set by this extensio
n.", | 37 "description": "Clear all content setting rules set by this extensio
n.", |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 "name": "set", | 108 "name": "set", |
| 109 "type": "function", | 109 "type": "function", |
| 110 "description": "Applies a new content setting rule.", | 110 "description": "Applies a new content setting rule.", |
| 111 "parameters": [ | 111 "parameters": [ |
| 112 { | 112 { |
| 113 "name": "details", | 113 "name": "details", |
| 114 "type": "object", | 114 "type": "object", |
| 115 "properties": { | 115 "properties": { |
| 116 "primaryPattern": { | 116 "primaryPattern": { |
| 117 "type": "string", | 117 "type": "string", |
| 118 "description": "The pattern for the primary URL. For details
on the format of a pattern, see <a href='contentSettings.html#patterns'>Content
Setting Patterns</a>." | 118 "description": "The pattern for the primary URL. For details
on the format of a pattern, see <a href='contentSettings#patterns'>Content Sett
ing Patterns</a>." |
| 119 }, | 119 }, |
| 120 "secondaryPattern": { | 120 "secondaryPattern": { |
| 121 "type": "string", | 121 "type": "string", |
| 122 "description": "The pattern for the secondary URL. Defaults
to matching all URLs. For details on the format of a pattern, see <a href='conte
ntSettings.html#patterns'>Content Setting Patterns</a>.", | 122 "description": "The pattern for the secondary URL. Defaults
to matching all URLs. For details on the format of a pattern, see <a href='conte
ntSettings#patterns'>Content Setting Patterns</a>.", |
| 123 "optional": true | 123 "optional": true |
| 124 }, | 124 }, |
| 125 "resourceIdentifier": { | 125 "resourceIdentifier": { |
| 126 "$ref": "ResourceIdentifier", | 126 "$ref": "ResourceIdentifier", |
| 127 "optional": true, | 127 "optional": true, |
| 128 "description": "The resource identifier for the content type
." | 128 "description": "The resource identifier for the content type
." |
| 129 }, | 129 }, |
| 130 "setting": { | 130 "setting": { |
| 131 "type": "any", | 131 "type": "any", |
| 132 "description": "The setting applied by this rule. See the de
scription of the individual ContentSetting objects for the possible values." | 132 "description": "The setting applied by this rule. See the de
scription of the individual ContentSetting objects for the possible values." |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 "$ref": "ContentSetting", | 217 "$ref": "ContentSetting", |
| 218 "description": "Whether to allow sites to show desktop notifications. On
e of<br><var>allow</var>: Allow sites to show desktop notifications,<br><var>blo
ck</var>: Don't allow sites to show desktop notifications,<br><var>ask</var>: As
k when a site wants to show desktop notifications. <br>Default is <var>ask</var>
.<br>The primary URL is the main-frame URL. The secondary URL is not used.", | 218 "description": "Whether to allow sites to show desktop notifications. On
e of<br><var>allow</var>: Allow sites to show desktop notifications,<br><var>blo
ck</var>: Don't allow sites to show desktop notifications,<br><var>ask</var>: As
k when a site wants to show desktop notifications. <br>Default is <var>ask</var>
.<br>The primary URL is the main-frame URL. The secondary URL is not used.", |
| 219 "value": [ | 219 "value": [ |
| 220 "notifications", | 220 "notifications", |
| 221 {"type":"string", "enum": ["allow", "block", "ask"]} | 221 {"type":"string", "enum": ["allow", "block", "ask"]} |
| 222 ] | 222 ] |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 } | 225 } |
| 226 ] | 226 ] |
| OLD | NEW |