Commit Graph

52 Commits

Author SHA1 Message Date
Bob Silverberg
c58b21ff61 Bug 1418311 - Avoid overwriting the notifications map in different contexts, r=mixedpuppy
Prior to this patch, the map that holds the list of notifications for an extension was recreated
for each context. This fixes that issue and maintains a list for the extension across all
contexts.

MozReview-Commit-ID: 2wfABoyyqvF
2017-11-17 11:42:04 -05:00
Kris Maglione
9703aaff5e Add bug number to comment about implementing notifications.onClose.byUser support. (no bug) r=trivial DONTBUILD
MozReview-Commit-ID: HFernhOu4lG
2017-10-31 12:04:03 -07:00
Kris Maglione
8077ebeb20 Bug 1387898: Remove unnecessary uses of EventEmitter.decorate. r=mixedpuppy
MozReview-Commit-ID: FRCdXHc3S4K
2017-08-07 14:42:57 -07:00
Bob Silverberg
4bc1b30042 Bug 1352711 - Add a notifications.onShown event and use it to fix an intermittent in test_ext_notifications.html, r=mixedpuppy
MozReview-Commit-ID: GC9poUR4jnu
2017-08-02 04:44:10 -04: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
Sebastian Hengst
8642712c2a Backed out changeset 26fd6d0a1254 (bug 1369577) for failing xpcshell's test_ext_simple.js and test_ext_startup_cache.js on Android. r=backout 2017-06-30 01:01:13 +02:00
Andrew Swan
c140bd9d12 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Mark Banner
9916415caf Bug 1371292 - Clean up more ESLint global definitions in configuration files in toolkit/ and browser/. r=mossop
MozReview-Commit-ID: 5KC23kzaCFN
2017-06-08 10:59:12 +01: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
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
Andrew Swan
d23b45b581 Bug 1203330 Part 2 Convert EventManager uses to SingletonEventManager r=kmag
MozReview-Commit-ID: A12TPwAYzTS
2017-01-26 11:27:03 -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
99c8d3a692 Bug 1203330 Part 2 Convert EventManager uses to SingletonEventManager r=kmag
MozReview-Commit-ID: A12TPwAYzTS
2017-01-26 11:27:03 -08: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
Luca Greco
5a67e9eff3 Bug 1286526 - [webext] Fix shutdown issues on empty addon with a valid manifest. r=aswan
MozReview-Commit-ID: 30MryAPYBv0
2016-07-13 13:12:59 +02: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
Bob Silverberg
dfbb8f8934 Bug 1275165 - notifications.onClicked not being triggered, r=kmag
Change the value of the textClickable argument passed into nsIAlertsService.showAlertNotification to be `true`

MozReview-Commit-ID: 7BqwUnt8ZK3
2016-06-01 23:42:04 -04:00
Bob Silverberg
d32c3a7f3f Bug 1275363 - Fix ext-notifications.js, line 59: TypeError: this is undefined, r=kmag
MozReview-Commit-ID: j6G1dXvoXQ
2016-05-29 17:23:57 -07:00
Bob Silverberg
7f5d1a2873 Bug 1265797 - WebExtensions Notification observer should not remove the notificationId on alertshow. r=aswan
MozReview-Commit-ID: 4RGVdSrF4OU
2016-05-10 12:14:44 -04:00
Bob Silverberg
3f41807961 Bug 1265716 - Don't try to emit notification events if the extension has been unloaded, r=aswan
MozReview-Commit-ID: GBdf7bzEFpa
2016-04-18 14:49:38 -04:00
bsilverberg
8cd6654119 Bug 1256635 - Implement browser.notifications.onClicked, r=kmag
Note that we cannot add a real test for onClicked without mocking out the AlertService. I did test it manually and it seems to work fine.

MozReview-Commit-ID: 68nooxoUJat
2016-03-16 16:49:10 +01:00
bsilverberg
3f567a3d0a Bug 1254359 - notifications.getAll() result is not Chrome-compatible, r=kmag
MozReview-Commit-ID: EIeIZquJaIN
2016-03-30 09:31:37 -04:00
bsilverberg
b0f25e4d7a Bug 1254291 - Add schema for the notifications API, r=kmag
Also update ext-notifications.js to use a Map instead of a Set

MozReview-Commit-ID: JBKM9fZXpah
2016-03-29 15:22:18 -04:00
Wes Kocher
163dbd8362 Backed out changeset e5c63c3fb088 (bug 1254291) for apparently causing leaks in OSX m(5)
MozReview-Commit-ID: DGymVB5Vtw5
2016-03-16 16:20:23 -07:00
bsilverberg
9b9e10fa69 Bug 1254291 - Add schema for the notifications API, r=kmag
Also update ext-notifications.js to use a Map instead of a Set

Note that I am not sure whether the schema has been implemented exactly as we'd want. There are, for example, options in NotificationOptions that we will never use/support, so I'm not sure how to document that.

MozReview-Commit-ID: 5Di7klOdI6G
2016-03-15 17:36:54 +01:00
Kris Maglione
666cee3637 Bug 1248855 - [webext] Add "object-curly-spacing" ESLint rule and auto-fix errors. r=billm
MozReview-Commit-ID: BAZ2rRl7eSM
2016-02-16 20:10:00 -08:00
Kris Maglione
7e08d1f8a7 Bug 1234020: Part 2m - [webext] Return promises from the notifications API. r=rpl 2016-02-04 13:34:11 -08:00
Sami Jaktholm
aa330823f9 Bug 1233350 - Fix TypeError in notifications.getAll(). r=kmag
This also adds some tests for the method.
2015-12-22 11:29:22 +02: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
Kris Maglione
314e0a9694 Bug 1224961: Remove non-standard JS features from WebExtension code 2015-11-02 18:09:09 -08:00
Bill McCloskey
948f074381 Bug 1223585 - [webext] Annotate ignoreEvent (r=kmag) 2015-11-12 08:19:45 -08:00
Carsten "Tomcat" Book
036e6d2fa3 Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book
12369728f5 Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)
2015-10-07 12:13:45 +02:00
Shu-yu Guo
474f49adb7 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Johann Hofmann
a1b1e52a47 Bug 1204072 - Import runSafe in ext-{alarms,notifications} (r=billm) 2015-09-25 05:09:11 -07:00
Bill McCloskey
1c889843fc Bug 1203331 - [webext] Use SingletonEventManager in a few places (r=gabor) 2015-09-23 17:18:35 -07:00
Phil Ringnalda
aaf72d29b9 Backed out 12 changesets (bug 1202482, bug 1202483, bug 1202481, bug 1202486, bug 1202479, bug 1202478, bug 1197475, bug 1203331, bug 1139860, bug 1202501, bug 1199473, bug 1190662) for Mulet mochitest-5 timeouts
CLOSED TREE

Backed out changeset 6503123e95dd (bug 1139860)
Backed out changeset b83bc163064d (bug 1203331)
Backed out changeset 2f501bd57cd2 (bug 1202481)
Backed out changeset 37e6ac7beb42 (bug 1202486)
Backed out changeset f9b6e99e620e (bug 1202483)
Backed out changeset 466af9f9baee (bug 1202482)
Backed out changeset 6be690e265a2 (bug 1202479)
Backed out changeset 57ff88bfccf4 (bug 1197475)
Backed out changeset 7e8c04ff6049 (bug 1202478)
Backed out changeset 525227997274 (bug 1202501)
Backed out changeset da317cdb79d3 (bug 1199473)
Backed out changeset 73b8ddd6dac9 (bug 1190662)
2015-09-22 19:29:51 -07:00
Bill McCloskey
34d9fdc980 Bug 1203331 - [webext] Use SingletonEventManager in a few places (r=gabor) 2015-09-22 16:09:23 -07:00
Shu-yu Guo
37989840cd Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Fabrice Desré
bc561611cc Bug 1190995 - Support the new extension model in b2g r=billm 2015-08-14 16:55:09 -07:00
Fabrice Desré
c50552b3e4 Bug 1190995 - backout 0450f02a2b3b for M1 failures 2015-08-14 17:57:34 -07:00
Fabrice Desré
edcc328e33 Bug 1190995 - Support the new extension model in b2g r=billm 2015-08-14 16:55:09 -07:00
Bill McCloskey
1ba4b05dd9 Bug 1175770 - New extension API (r=Mossop) 2015-08-03 10:41:24 -07:00