| Auto-Submit | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Nice tidying up here. LGTM, just one suggestion/question around clarifying "strong C++ types" vs "C++ types"
which is exactly what we want for the commands API (we don't need
strong C++ types, since we don't use them anywhere).This sounds a little counter to the comment above the block it has been moved to: "Schemas that should be used only to auto-generate the C++ types."
I guess this is conflation between types for manifest validation vs strong types for API JS parameter/response validation? Is there some language we can use in the gni-comment to make this more clear?
CommandsgetAllFunction (following our normal naming pattern).nit: CommandsGetAllFunction
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
which is exactly what we want for the commands API (we don't need
strong C++ types, since we don't use them anywhere).This sounds a little counter to the comment above the block it has been moved to: "Schemas that should be used only to auto-generate the C++ types."
I guess this is conflation between types for manifest validation vs strong types for API JS parameter/response validation? Is there some language we can use in the gni-comment to make this more clear?
That comment is just patently wrong. We explicitly _don't_ use uncompiled sources for C++ types.
Let me do that in a followup to lazily use the existing try run here, since this CL doesn't touch that line.
CommandsgetAllFunction (following our normal naming pattern).Devlin Croninnit: CommandsGetAllFunction
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
[Extensions] Make commands.json / commands API less special
Right now, the commands.json schema is included in a special list in
//extensions/common/api/BUILD.gn and then functions are
"hand-registered" in ChromeExtensionsBrowserAPIProvider.
Instead:
* Move commands.json to uncompiled_sources_ in
//extensions/common/api/api_schemas.gni. This list is used for APIs
that should have the generated JSON strings and function registration,
which is exactly what we want for the commands API (we don't need
strong C++ types, since we don't use them anywhere).
* Use this to auto-register the commands function.
* To enable that, add an "implemented_in" option to commands.json (since
it's implemented in commands.h instead of commands_api.h) and rename
the API function class from GetAllCommandsFunction to
CommandsGetAllFunction (following our normal naming pattern).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |