- This was the last non-schema-generated API in content scripts.
MozReview-Commit-ID: FaIOCHoircf
--HG--
extra : rebase_source : 7bab2249a7462a581e493f7aa937df45cb895107
- Use schema-generated runtime API for content scripts instead of
untyped API.
- Move logic that cannot be run in the main process to a new file.
Together with the previous patch that migrated the i18n API, this
concludes the fix for bug 1286712.
MozReview-Commit-ID: A3yG0x1kjwx
--HG--
extra : rebase_source : 19efe95149c423c0f9284bb70e289a282fb758c1
Use schema-generated i18n API for both content script and
addon contexts, instead of just the addon context.
MozReview-Commit-ID: AKDAFxNv6Zs
--HG--
extra : rebase_source : ea66e8bab7b4713d971614ce27e8c1d9350a0a14
- By default, schema APIs are not injected in content scripts unless
the JSON schema sets the "restrictions" attribute to `["content"]`.
- Added the "restrictions" attribute to the storage and test schemas.
Other APIs will follow in subsequent commits and make use of the
primitives introduced in this commit.
MozReview-Commit-ID: 1rNjQap0BiM
--HG--
extra : rebase_source : bf2c7fb70a38fbf13cdfd4337cb3cb6fef7e67e8
- Moved Management logic to ExtensionUtils (as SchemaAPIManager) so that
the logic can be used by addon and content processes.
- Remove the `context.extension.hasPermission(api.permission)` check in
`generateAPIs` because the only user (`registeredPrivilegedAPI`) was
removed before in bug 1295082.
- Add new category "webextension-scripts-content", intended for
registering the few scripts that must be loaded in a content process.
MozReview-Commit-ID: 81nhblV8YE6
--HG--
extra : rebase_source : d2eee0298ad5038225ea56c2e752532af0bc6fb7
- Add `envType` to BaseContext.
- Pass an explicit envType to all `registerSchemaAPI` invocations.
- The factories passed to `registerSchemaAPI` will be split up later, so
that content scripts (`content_child`) and addon pages can share
common implementations.
- The factories that implement the addon API will also be split up,
to separate code running in the main process (`addon_parent`) from
code running in a child process (`addon_child`).
- Remove the use of a hardcoded list of `namespaces` from ProxyContext.
Now `envType` is used to specify whether an API should be activated.
MozReview-Commit-ID: Jiff8HIwG92
--HG--
extra : rebase_source : 946a3c0009a4e3223c2d10044b3099a94c845394
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.
And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.
MozReview-Commit-ID: BgsGGCPQxJR
--HG--
extra : rebase_source : 7aa9fb7a53e057e8d3d8c477bd6821f8344c571a
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.
And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.
MozReview-Commit-ID: BgsGGCPQxJR
--HG--
extra : rebase_source : 9a85d95f0c147198938b86c57127f6e7403fd53c
ESLint 2 now flags anonymous generator functions that don't match the
generator-star-spacing rule so this mostly is fixing that.
MozReview-Commit-ID: 5sLaF26sd0E
--HG--
extra : rebase_source : 6008f48c94e4a8e5bd2ed2f8a95e764e4aa39cdb
extra : histedit_source : 6f0151c184ee2e4288f3ec9c5a85a65e975d46e1
Implement browser.i18n.getAcceptLanguages() including tests
Rebase against fx-team, resolving some conflicts
Fix eslint errors/warnings
MozReview-Commit-ID: 52sZWsIHbl4
--HG--
extra : amend_source : 2339e42a83460682a8d6df206c10849b38a288eb