Commit Graph

47 Commits

Author SHA1 Message Date
Andrew Swan
dfdaca71bf Bug 1450388 Part 1 Refactor EventManager r=kmag
As we add more behaviors to EventManager, the signature of the constructor
is going to get really clumsy.  Head that off by converting it to take a
general parameters object.

This introduces a compatibility problem for existing webextension experiments,
put in a backward-compatibility shim for now.

MozReview-Commit-ID: 72QDfiwRm5j
2018-03-14 14:52:44 -07:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Luca Greco
f5ac764153 Bug 1396605 - Prevent duplicated Firefox for Android PageAction icons for a single extension. r=mixedpuppy
MozReview-Commit-ID: 1axv6vFXcCu
2017-09-04 21:09:58 +02:00
Luca Greco
8163494d0e Bug 1383160 - Fix Android pageAction popup behavior. r=mixedpuppy
MozReview-Commit-ID: 66PnjFv4IIx
2017-08-15 22:55:13 +02:00
Luca Greco
fc0d4ba79f Bug 1394846 - Fix EventEmitter.decorate exception on Firefox for Android. r=mixedpuppy
MozReview-Commit-ID: DhaVpD1zcaS
2017-08-29 18:26:29 +02:00
Luca Greco
d7dd7cc81f Bug 1389911 - Support activeTab permission on Firefox for Android pageAction. r=mixedpuppy
MozReview-Commit-ID: HTPBdu2KDVu
2017-08-14 20:59:43 +02:00
Dan Banner
35b0ff1c12 Bug 1385815 - Enable more ESLint rules for mobile/android. r=sebastian
MozReview-Commit-ID: aC7PX7xDok
2017-08-01 16:41:38 +01:00
Luca Greco
b1b66b184d Bug 1380575 - Fix EventEmitter lazy import for browserAction on Android. r=mixedpuppy
MozReview-Commit-ID: DvcRCQKHxI
2017-07-28 12:15:24 +02:00
Luca Greco
acda823a8a Bug 1384964 - Fix pageAction.show/hide/getPopup/setPopup on Android for tabId 0. r=mixedpuppy
MozReview-Commit-ID: FVcbQkiTGqe
2017-07-27 18:23:16 +02:00
Andrew Swan
3d501bbfd5 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Bob Silverberg
ccffacedee Bug 1374237 - Part 4: Declare all top-level functions in android API files files via const., r=mixedpuppy
MozReview-Commit-ID: H1EE6wsDpOy
2017-06-28 10:50:02 -07:00
Matthew Wein
d10ac6d603 Bug 1300811 - Part 4 - Support show and hide on a per tab basis r=mixedpuppy
MozReview-Commit-ID: 45Xde2KwTYU
2017-06-13 23:15:32 -04:00
Matthew Wein
c44c7ad988 Bug 1300811 - Part 1 - Convert PageAction to a class r=mixedpuppy
MozReview-Commit-ID: 8sMK98hoq84
2017-06-12 21:39:24 -04:00
Kris Maglione
db3ec327d2 Bug 1368189: Move more code out of ExtensionUtils.jsm. r=mixedpuppy
Also removes some dead code.

A lot of the code in ExtensionUtils.jsm is not needed in all processes, and a
lot of the rest isn't needed until extension code runs. Most of it winds up
being loaded into all processes way earlier than necessary.

MozReview-Commit-ID: CMRjCPOjRF2
2017-05-26 15:44:41 -07:00
Alexandre Poirot
208511b0d3 Bug 1356231 - Use toolkit EventEmitter.jsm instead of devtools module. r=mossop
MozReview-Commit-ID: 49JI7NtLwKK
2017-04-27 17:58:09 +02:00
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
a3ef8da863 Bug 1350522: Part 3 - Convert android APIs to lazy loading. r=aswan
MozReview-Commit-ID: GaxLICqzdXz
2017-03-31 18:45:45 -07:00
Luca Greco
feb8d7cc79 Bug 1345574 - Fix missing tab details in pageAction.onClicked events on Android. r=kmag
MozReview-Commit-ID: EqnNcku8LHE
2017-03-08 18:52:17 +01:00
Andrew Swan
1ac8741081 Bug 1203330 Part 1 Fix SingletonEventManager r=kmag
This patch adds the ability to run SingletonEventManager handlers in
different modes: sync, async, raw (no exception handling, arg cloning,
or asynchrony), or asyncWithoutClone. When you call the handler,
you're required to specify which variant you want.

Existing uses of SingletonEventManager are all converted to async calls.
Note that some of them were previously synchronous, but it didn't appear
to be necessary.

Also added a callOnClose for SingletonEventManager when the last listener
is removed.

MozReview-Commit-ID: ATHO97dWf3X
2017-01-26 20:00:33 -08:00
Phil Ringnalda
5781d2a09e Backed out 3 changesets (bug 1203330) for failures in test_delay_update_webextension.js
CLOSED TREE

Backed out changeset 2d42350d209a (bug 1203330)
Backed out changeset 3a12c51c3eca (bug 1203330)
Backed out changeset 31fac390e15d (bug 1203330)
2017-01-26 19:13:11 -08:00
Andrew Swan
8e5ca9edb5 Bug 1203330 Part 1 Fix SingletonEventManager r=kmag
This patch adds the ability to run SingletonEventManager handlers in
different modes: sync, async, raw (no exception handling, arg cloning,
or asynchrony), or asyncWithoutClone. When you call the handler,
you're required to specify which variant you want.

Existing uses of SingletonEventManager are all converted to async calls.
Note that some of them were previously synchronous, but it didn't appear
to be necessary.

Also added a callOnClose for SingletonEventManager when the last listener
is removed.

MozReview-Commit-ID: ATHO97dWf3X
2017-01-26 13:43:12 -08:00
Rob Wu
a5e3a4826d Bug 1287007 - Remove .contentWindow from ProxyContext r=billm
MozReview-Commit-ID: ASNigrM07yz
2016-09-13 16:02:03 -07:00
Matthew Wein
0310359f3f Bug 1300807 - Switch to using a uuid for the PageAction ID. r=kmag
MozReview-Commit-ID: 4jlz9gdUuQd
2016-09-13 11:13:40 -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
e30a4f143e Bug 1272222: Use larger icons for browser actions in the menu panel. r=Gijs
MozReview-Commit-ID: 26lmlcrngPk
2016-07-13 15:16:00 -07:00
Matthew Wein
6206634766 Bug 1270742 - Add support for default_icon in chrome.pageAction r=kmag
MozReview-Commit-ID: D9uR0JUXJwx
2016-05-23 15:59:33 -07:00
Sebastian Hengst
1be0f90cda Backed out changeset 1008f5b88e6b (bug 1270742) for failing browser_ext_browserAction_context.js. r=backout 2016-06-24 13:00:31 +02:00
Matthew Wein
0ead67a3c6 Bug 1270742 - Add support for default_icon in chrome.pageAction. r=kmag
MozReview-Commit-ID: D9uR0JUXJwx
2016-05-23 15:59:33 -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
Matthew Wein
5c28378258 Part 2: Implement {set|get}Popup for chrome.pageAction (Bug 1264118) r=kmag
MozReview-Commit-ID: 1ZyQgs8ktic
2016-05-30 19:42:03 -07:00
Matthew Wein
02bac45407 Part 1: Implement default_popup for chrome.pageAction (Bug 1264118) r=kmag
MozReview-Commit-ID: BrV0v66BhBz
2016-06-02 16:14:20 -04:00
Carsten "Tomcat" Book
a0d2c3ac66 Backed out changeset df585c71e322 (bug 1264118) for ES test failures 2016-06-07 09:27:13 +02:00
Carsten "Tomcat" Book
a1aba41f51 Backed out changeset b06ec8711d04 (bug 1264118) 2016-06-07 09:26:58 +02:00
Matthew Wein
d235c20e8a Bug 1264118 - Part 2: Implement {set|get}Popup for chrome.pageAction (Bug 1264118). r=kmag
MozReview-Commit-ID: 1ZyQgs8ktic
2016-05-30 19:42:03 -07:00
Matthew Wein
7b39dc3b9f Bug 1264118 - Part 1: Implement default_popup for chrome.pageAction (Bug 1264118). r=kmag
MozReview-Commit-ID: BrV0v66BhBz
2016-06-02 16:14:20 -04:00
Matthew Wein
a0134d24ad Bug 1267346 - Implement chrome.PageAction.hide on Android. r=kmag
MozReview-Commit-ID: Isxgovo3Txb
2016-05-13 15:52:24 -07:00
Matthew Wein
ad75549a93 Bug 1267402 - Implement chrome.pageAction.onClicked on Android. r=kmag, margaret
MozReview-Commit-ID: EJI224vD2Za
2016-05-13 18:36:06 -07:00
Matthew Wein
fe3eb3ab18 Bug 1267124 - Implement chrome.pageAction.show on Android. r=kmag, r=margaret
MozReview-Commit-ID: AOwfuuCfhRx
2016-04-27 19:06:24 -04:00