Commit Graph

25 Commits

Author SHA1 Message Date
Kris Maglione
da08b6926c Bug 1317697: Remove things from ExtensionUtils that don't belong there. r=mixedpuppy
MozReview-Commit-ID: CTX0TckLqoV
2017-04-07 13:39:06 -07:00
Kris Maglione
884009911d Bug 1350522: Part 2 - Convert toolkit APIs to lazy loading. r=aswan
MozReview-Commit-ID: 8TbTIM4WX2d
2017-03-31 19:36:00 -07:00
Luca Greco
89a4aa4c82 Bug 1309906 - part2: provide existent APIs to the devtools contexts. r=kmag
MozReview-Commit-ID: L6YOpnMPVFf
2016-11-04 12:41:12 +01:00
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
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
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
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
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
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
KuoE0
466f2ee2c8 Bug 1254866 - ReferenceError: Cu is not defined in ext-i18n.js, r=kmag
MozReview-Commit-ID: 9LCxyoSWheT
2016-03-10 15:02:15 -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
Bill McCloskey
c8337c42c8 Bug 1208257 - [webext] i18n.json (r=kmag) 2015-12-23 08:57:13 -08:00
Kris Maglione
956fe582d0 Bug 1229874: Part 3 - Enable ESLint in WebExtension code. r=billm
The base .eslintrc is essentially a merge of the root Toolkit .eslintrc and
the devtools .eslintrc, with some minor changes to match our prevalent style.

For the most enforces the coding styles that we've been using most
consistently. There are a couple of significant differences, though:

 * The rule for opening brace alignment can only be applied globally, and
   doesn't make exceptions for top-level functions. I chose to turn it on, and
   change the brace style of existing top-level functions that violated it,
   since the rule seemed worth using, and that's the direction most Toolkit JS
   code has been headed anyway.

 * The rule for switch/case statements requires an added indentation level for
   case statements. Most of our switch statements did not use an extra level
   of indentation, and I initially wrote the rule to enforce that style, until
   I came across case statements that used blocks, and required the extra
   indentation level for sanity.
2015-12-02 16:58:53 -08:00
Bill McCloskey
1ba4b05dd9 Bug 1175770 - New extension API (r=Mossop) 2015-08-03 10:41:24 -07:00
Carsten "Tomcat" Book
5b881a75d9 Backed out changeset 4e3821b236f9 (bug 1175770) 2015-08-03 09:37:54 +02:00
Bill McCloskey
d7318b2bd9 Bug 1175770 - New extension API (r=Mossop) 2015-08-02 17:29:55 -07:00