Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: chrome/common/extensions/api/_features.md

Issue 2494653005: Support API aliases (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 If the parent of a feature is a complex feature, the feature system needs to 113 If the parent of a feature is a complex feature, the feature system needs to
114 know which parent to inherit from. To do this, add the property 114 know which parent to inherit from. To do this, add the property
115 `"default_parent": true` to one of the feature definitions in the parent 115 `"default_parent": true` to one of the feature definitions in the parent
116 feature. 116 feature.
117 117
118 ## Properties 118 ## Properties
119 119
120 The following properties are supported in the feature system. 120 The following properties are supported in the feature system.
121 121
122 ### alias
123
124 The `alias` property is available only for API features. It should be set for
125 API features that have an alias. The value should be the name of the alias API
Devlin 2016/11/14 18:03:56 We should describe what an alias is here. :)
tbarzic 2016/11/15 04:45:07 Done.
126 feature. The alias feature should have `source` property set to the name of the
127 API that it aliased.
128
129 For complex features, `alias` property will be set to the `alias` value of the
130 first component simple feature that has it set.
131
122 ### blacklist 132 ### blacklist
123 133
124 The `blacklist` property specifies a list of ID hashes for extensions that 134 The `blacklist` property specifies a list of ID hashes for extensions that
125 cannot access a feature. See ID Hashes in this document for how to generate 135 cannot access a feature. See ID Hashes in this document for how to generate
126 these hashes. 136 these hashes.
127 137
128 Accepted values are lists of id hashes. 138 Accepted values are lists of id hashes.
129 139
130 ### channel 140 ### channel
131 141
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 The `session_types` property specifies in which types of sessions a feature 268 The `session_types` property specifies in which types of sessions a feature
259 should be available. The session type describes the type of user that is 269 should be available. The session type describes the type of user that is
260 logged in the current session. Session types to which feature can be restricted 270 logged in the current session. Session types to which feature can be restricted
261 are only supported on Chrome OS - features restricted to set of session types 271 are only supported on Chrome OS - features restricted to set of session types
262 will be disabled on other platforms. Also, note that all currently supported 272 will be disabled on other platforms. Also, note that all currently supported
263 session types imply that a user is logged into the session (i.e. features that 273 session types imply that a user is logged into the session (i.e. features that
264 use 'session_types' property will be disabled when a user is not logged in). 274 use 'session_types' property will be disabled when a user is not logged in).
265 275
266 The accepted values are lists of strings from `regular` and `kiosk`. 276 The accepted values are lists of strings from `regular` and `kiosk`.
267 277
278 ### source
Devlin 2016/11/14 18:03:56 I think having an example here would probably be u
tbarzic 2016/11/15 04:45:07 Done.
279
280 The `source` property is available only for API features. It should be set for
281 alias API feature. The value should be the name of the API the alias is
282 aliasing. The source API feature should have `alias` property set to the alias
283 API name.
284 The alias API will inherit schema from the source API, but it will not respect
285 the source API child features. To accomplish parity with the source API feature
286 children, identical child features should be added for the alias API.
287
288 For complex features, `source` property will be set to the `source` value of the
289 first component simple feature that has it set.
290
268 ### whitelist 291 ### whitelist
269 292
270 The `whitelist` property specifies a list of ID hashes for extensions that 293 The `whitelist` property specifies a list of ID hashes for extensions that
271 are the only extensions allowed to access a feature. 294 are the only extensions allowed to access a feature.
272 295
273 Accepted values are lists of id hashes. 296 Accepted values are lists of id hashes.
274 297
275 ## ID Hashes 298 ## ID Hashes
276 299
277 Instead of listing the ID directly in the whitelist or blacklist section, we 300 Instead of listing the ID directly in the whitelist or blacklist section, we
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 at runtime, this has the added benefit of allowing us to validate at compile 405 at runtime, this has the added benefit of allowing us to validate at compile
383 time rather than needing a unittest (or allowing incorrect features). 406 time rather than needing a unittest (or allowing incorrect features).
384 407
385 In theory, invalid features should result in a compilation failure; in practice, 408 In theory, invalid features should result in a compilation failure; in practice,
386 the compiler is probably missing some cases. 409 the compiler is probably missing some cases.
387 410
388 ## Still to come 411 ## Still to come
389 412
390 TODO(devlin): Add documentation for extension types. Probably also more on 413 TODO(devlin): Add documentation for extension types. Probably also more on
391 requirements for individual features. 414 requirements for individual features.
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/api/common_extension_api_unittest.cc » ('j') | extensions/common/extension_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698