Rob Wu
4aa1ab5d36
Bug 1287010 - Use schema-generated i18n for all contexts r=billm
...
Use schema-generated i18n API for both content script and
addon contexts, instead of just the addon context.
MozReview-Commit-ID: AKDAFxNv6Zs
2016-08-20 15:49:20 -07:00
Rob Wu
fc61c013eb
Bug 1287010 - Prepare for moving content script APIs to schemas r=billm
...
- 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
2016-08-18 17:46:57 -07:00
Rob Wu
488a453294
Bug 1287010 - Move Management logic to SchemaAPIManager r=billm
...
- 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
2016-08-17 17:51:21 -07:00
Rob Wu
812e170fe8
Bug 1287010 - Make environment of Context explicit. r=billm
...
- 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
2016-08-16 15:51:50 -07:00
Rob Wu
98a49ff299
Bug 1295082 - BaseContext.extensionId -> BaseContext.extension.id r=kmag
...
MozReview-Commit-ID: 2tFVUwjyJQu
2016-08-16 14:29:52 -07:00
Rob Wu
6efdd88867
Bug 1295082 - Put Extension in BaseContext r=kmag
...
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
2016-08-15 01:04:58 -07:00
Sebastian Hengst
c7a498ffbd
Backed out changeset 0ce1cc39aa3d (bug 1295082) for timing out in test_ext_schemas_api_injection.js. r=backout
2016-08-18 16:47:09 +02:00
Sebastian Hengst
ff21875b1a
Backed out changeset dc7b09331202 (bug 1295082)
2016-08-18 16:46:30 +02:00
Rob Wu
7c6379abff
Bug 1295082 - BaseContext.extensionId -> BaseContext.extension.id r=kmag
...
MozReview-Commit-ID: 2tFVUwjyJQu
2016-08-16 14:29:52 -07:00
Rob Wu
6189daa99f
Bug 1295082 - Put Extension in BaseContext r=kmag
...
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
2016-08-15 01:04:58 -07:00
Rob Wu
8472b153c7
Bug 1290157 - Always pass an array to tabs.executeScript on success r=kmag
...
MozReview-Commit-ID: Ctw8RUtfEZC
2016-08-09 00:28:47 -07:00
Wes Kocher
b9d5a32ad5
Merge inbound to central, a=merge
2016-08-12 13:44:29 -07:00
Kris Maglione
874e487954
Bug 1292369: Null out contentWindow properties when they point to a different inner window than the context belongs to. r=billm
...
MozReview-Commit-ID: LYQRxpU9vI8
2016-08-04 16:18:25 -07:00
Kris Maglione
d970e4c3c7
Bug 1293700: Make console object available to WebExtension internals. r=aswan
...
MozReview-Commit-ID: GyD4uo95gt6
2016-08-09 12:40:25 -07:00
Rob Wu
922403c487
Bug 1293126 - Remove Schemas.load from content's ExtensionContext r=kmag
...
MozReview-Commit-ID: JOToEC2Aokp
2016-08-07 17:59:58 -07:00
Rob Wu
c576617ccb
Bug 1197451 - Add clipboardWrite permission r=billm
...
MozReview-Commit-ID: 6d1mQSVWRPe
2016-07-08 17:19:17 -07:00
Jared Wein
ebf1ccbe46
Bug 1291855 - Enable the no-else-return rule for eslint. r=Felipe,kmag,mossop
...
MozReview-Commit-ID: DYOmE6xwMJh
2016-08-03 18:54:59 -04:00
Kris Maglione
8c3da6958e
Bug 1274871: Return a more useful error message for executeScript without matching window. r=aswan
...
MozReview-Commit-ID: 3AhuxY6gQPL
2016-07-26 17:55:58 -07:00
Rob Wu
3cbb2da8a5
Bug 1280482 - Add export helpers to content scripts. r=kmag
...
MozReview-Commit-ID: I4o3NXVphJX
2016-07-15 23:33:47 -07:00
Kris Maglione
4b566c58e2
Bug 1284020: Treat window.fetch/window.XMLHttpRequest the same as the global variants in content scripts. r=aswan
...
MozReview-Commit-ID: Cuz6CiNZdrd
2016-07-12 15:45:07 -07:00
Sebastian Hengst
b341fe6cc0
Backed out changeset 56d636b5d961 (bug 1284020) for failures in browser_dbg_sources-webext-contentscript.js. r=backout
2016-07-13 10:02:09 +02:00
Kris Maglione
59b91fbcfa
Bug 1284020: Treat window.fetch/window.XMLHttpRequest the same as the global variants in content scripts. r=aswan
...
MozReview-Commit-ID: Cuz6CiNZdrd
2016-07-12 15:45:07 -07:00
Kris Maglione
8e28312be9
Bug 1284942: Don't fire message listeners for windows hidden in bfcache. r=aswan
...
MozReview-Commit-ID: KSqLt7Qqdkf
2016-07-06 17:14:02 -07:00
Kris Maglione
843973aa31
Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
...
MozReview-Commit-ID: 8m7wJrAbFwS
2016-06-09 17:44:47 -07:00
Sebastian Hengst
d97f588f03
Backed out changeset a00cf073f5c0 (bug 1279392) for failing mochitest test_ext_contentscript_create_iframe.html at least on Linux x64 opt. r=backout
2016-06-14 13:37:52 +02:00
Kris Maglione
b2a33e3bf1
Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
...
MozReview-Commit-ID: 8m7wJrAbFwS
2016-06-09 17:44:47 -07:00
Kris Maglione
e2543e0554
Bug 1269141: Remove content script CSS when disabling an extension. r=aswan
...
MozReview-Commit-ID: Jhg4XzddIkA
2016-06-04 21:42:55 -07:00
Kris Maglione
fbe0dfe564
Bug 1256607: Support cross-origin fetch() access in WebExtension content scripts. r=aswan
...
MozReview-Commit-ID: Aw1LSMY3BAW
2016-06-04 20:31:13 -07:00
Bob Silverberg
a1b4a14e81
Bug 1276338 - chrome.runtime.id is undefined in content scripts, r=kmag
...
MozReview-Commit-ID: BXqB1rW9DzB
2016-05-31 11:55:30 -04:00
Claas Augner
1737833daa
Bug 1247455 - Add a .removeCSS method to complement .insertCSS. r=kmag
2016-04-15 00:39:09 +02:00
Bill McCloskey
f43508ae12
Bug 1197346 - Allow browser.storage to be used from content scripts (r=kmag)
2016-04-23 20:04:30 -07:00
Luca Greco
1daaa04fc1
Bug 1261857 - [webext] Support WebExtensions ContentScripts in the Tab DevTools Debugger. r=kmag
...
MozReview-Commit-ID: BtGqvAkRJZx
2016-04-15 17:09:57 +02:00
Dave Townsend
6c83da2486
Bug 1257246: Update webextension APIs for eslint 2. r=kmag
...
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
2016-04-05 11:30:51 -07:00
Wes Kocher
afb79fc224
Merge inbound to central, a=merge
...
MozReview-Commit-ID: L8YZYtbmper
2016-04-07 13:42:10 -07:00
Andrew Swan
2680b7869a
Bug 1217944 - Part 2 - Support wildcards in web_accessible_resources r=kmag
...
MozReview-Commit-ID: Ln6JJ5lxc3w
2016-04-06 13:20:23 -07:00
Andrew Swan
354791b132
Bug 1217944 - Part 1 - Make MatchGlobs work on arbitrary strings r=kmag
...
MozReview-Commit-ID: CK39lpGglKA
2016-04-06 13:07:47 -07:00
Kris Maglione
51106a2f9e
Bug 1258199: [webext] Return an empty string for missing keys in getMessage. r=aswan
...
MozReview-Commit-ID: KEQYq4nZbfk
2016-04-04 13:54:27 -07:00
Wes Kocher
c533b72e89
Backed out changeset c67309c62021 (bug 1258199) for xpcshell failures
...
MozReview-Commit-ID: FySkZPotDGU
2016-04-04 13:51:12 -07:00
Kris Maglione
3793854b24
Bug 1258199: [webext] Return an empty string for missing keys in getMessage. r=aswan
...
MozReview-Commit-ID: KEQYq4nZbfk
2016-03-28 17:21:06 +02:00
Tom Schuster
a73438740f
Bug 1223634 - Support exclude_globs/include_globs in webext manifests. r=kmag
2016-03-16 15:11:57 +01:00
Kris Maglione
e0795d5219
Bug 1220154, 1249830: Handle sendMessage replies with 0 and >1 listeners correctly. r=billm
...
MozReview-Commit-ID: 7lE7RaJcl7n
2016-03-04 15:40:56 -08:00
Dave Huseby
d7c8e692f6
Bug 1238177 - fix extension content needs to use the correct user context id origin attribute. r=sicking
...
(HEAD -> oa, refs/patches/oa/Bug_1238177)
Fixes Bug 1238177 -- extension content needs to use the correct user context id origin attribute
2016-04-04 12:20:00 +02:00
Kris Maglione
d7334ea44a
Bug 1248499: [webext] Implement tabs.detectLanguage. r=billm
...
MozReview-Commit-ID: F4GpSesj2ho
2016-02-26 13:20:28 -08:00
Kris Maglione
7a1a4278dd
Bug 1248497 – Add promise support to the sendMessage APIs. r=billm
...
MozReview-Commit-ID: AZH9LUq8kGr
2016-02-15 17:37:19 -08:00
Kris Maglione
55354c26e2
Bug 1213993: [webext] Support frameId/allFrames/runAt in browser.tabs.executeScript and insertCSS. r=billm
...
MozReview-Commit-ID: FgV9vyHVjj8
2016-02-08 17:40:02 -08:00
bsilverberg
1ba83c667a
Bug 1213450 - Complete the implementation of chrome.i18n - getAcceptLanguages, r=kmag
...
Implement browser.i18n.getAcceptLanguages() including tests
Rebase against fx-team, resolving some conflicts
Fix eslint errors/warnings
MozReview-Commit-ID: 52sZWsIHbl4
2016-02-25 07:29:09 -05:00
bsilverberg
520cdab332
Bug 1246754 - Complete the implementation of chrome.i18n.detectLanguage, r=kmag
...
MozReview-Commit-ID: 7cvJj0QP5XO
2016-02-23 22:01:11 -05:00
Phil Ringnalda
8fcf6aa84e
Back out 9466f6513f50 (bug 1213450) for timeouts in test_ext_i18n.html
2016-02-23 18:36:11 -08:00
bsilverberg
4cacadedfd
Bug 1213450 - Complete the implementation of chrome.i18n - getAcceptLanguages, r=kmag
...
Implement browser.i18n.getAcceptLanguages() including tests
MozReview-Commit-ID: EeuxXvg0l3M
2016-02-18 08:59:57 -05:00
bsilverberg
e72c240afa
Bug 1246748 - Complete the implementation of chrome.i18n.getUILanguage, r=kmag
...
Implement chrome.i18n.getUILanguage including tests
Add API to content scripts
MozReview-Commit-ID: IcDlLj8Et73
2016-02-18 07:50:17 -05:00