OLD | NEW |
1 # Extension Features Files | 1 # Extension Features Files |
2 | 2 |
3 [TOC] | 3 [TOC] |
4 | 4 |
5 ## Summary | 5 ## Summary |
6 | 6 |
7 The Extension features files specify the different requirements for extension | 7 The Extension features files specify the different requirements for extension |
8 feature availability. | 8 feature availability. |
9 | 9 |
10 An **extension feature** can be any component of extension capabilities. Most | 10 An **extension feature** can be any component of extension capabilities. Most |
11 notably, this includes extension APIs, but there are also more structural or | 11 notably, this includes extension APIs, but there are also more structural or |
12 behavioral features, such as web accessible resources or event pages. | 12 behavioral features, such as web accessible resources or event pages. |
13 | 13 |
14 ## Files | 14 ## Files |
15 | 15 |
16 There are four different feature files used: | 16 There are four different feature files used: |
17 * [\_api\_features](https://chromium.googlesource.com/chromium/src/+/master/chro
me/common/extensions/api/_api_features.json): | 17 * [\_api\_features](https://chromium.googlesource.com/chromium/src/+/master/chro
me/common/extensions/api/_api_features.json): |
18 Specifies the requirements for API availability. If an extension doesn't satisfy | 18 Specifies the requirements for API availability. If an extension doesn't satisfy |
19 the requirements, the API will not be accessible in the extension's code. | 19 the requirements, the API will not be accessible in the extension's code. |
20 * [\_permission\_features](https://chromium.googlesource.com/chromium/src/+/mast
er/chrome/common/extensions/api/_permission_features.json): | 20 * [\_permission\_features](https://chromium.googlesource.com/chromium/src/+/mast
er/chrome/common/extensions/api/_permission_features.json): |
21 Specifies the requirements for permission availability. If an extension doesn't | 21 Specifies the requirements for permission availability. If an extension doesn't |
22 satisfy the requirements, the permission will not be granted and the extension | 22 satisfy the requirements, the permission will not be granted and the extension |
23 will have an install warning. | 23 will have an install warning. |
24 * [\_manifest\_features](https://chromium.googlesource.com/chromium/src/+/master
/chrome/common/extensions/api/_manifest_features.json): | 24 * [\_manifest\_features](https://chromium.googlesource.com/chromium/src/+/master
/chrome/common/extensions/api/_manifest_features.json): |
25 Specifies the requirements for manifest entry availability. If an extension | 25 Specifies the requirements for manifest entry availability. If an extension |
26 doesn't satisfy the requirements, the extension will fail to load with an error. | 26 doesn't satisfy the requirements, the extension will fail to load with an error. |
27 * [\_behavior\_features](https://chromium.googlesource.com/chromium/src/+/master
/chrome/common/extensions/api/_behavior_features.json): | 27 * [\_behavior\_features](https://chromium.googlesource.com/chromium/src/+/master
/extensions/common/api/_behavior_features.json): |
28 Specifies the requirements for miscellaneous extension behaviors. This should | 28 Specifies the requirements for miscellaneous extension behaviors. This should |
29 typically not be used. | 29 typically not be used. |
30 | 30 |
31 Note that these files may be present under chrome/common/extensions/api, as well | 31 Note that these files may be present under chrome/common/extensions/api, as well |
32 as under extensions/common/api and extensions/shell/common/api. | 32 as under extensions/common/api and extensions/shell/common/api. |
33 | 33 |
34 ## Grammar | 34 ## Grammar |
35 | 35 |
36 The feature files are written in JSON. Each file contains a single JSON object | 36 The feature files are written in JSON. Each file contains a single JSON object |
37 with properties for each feature. | 37 with properties for each feature. |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 at runtime, this has the added benefit of allowing us to validate at compile | 449 at runtime, this has the added benefit of allowing us to validate at compile |
450 time rather than needing a unittest (or allowing incorrect features). | 450 time rather than needing a unittest (or allowing incorrect features). |
451 | 451 |
452 In theory, invalid features should result in a compilation failure; in practice, | 452 In theory, invalid features should result in a compilation failure; in practice, |
453 the compiler is probably missing some cases. | 453 the compiler is probably missing some cases. |
454 | 454 |
455 ## Still to come | 455 ## Still to come |
456 | 456 |
457 TODO(devlin): Add documentation for extension types. Probably also more on | 457 TODO(devlin): Add documentation for extension types. Probably also more on |
458 requirements for individual features. | 458 requirements for individual features. |
OLD | NEW |