Commit Graph

6 Commits

Author SHA1 Message Date
Kris Maglione
e69c789ec0 Bug 1317697: Split extension page child and content script child code as much as possible. r=mixedpuppy
MozReview-Commit-ID: 4lKFqoJHVFb
2017-04-14 16:57:34 -07:00
Kris Maglione
4c12719b3a Bug 1258360: Implement onMessageExternal and onConnectExternal. r=mixedpuppy
MozReview-Commit-ID: 7NTrgyWpXbv
2017-02-11 13:28:18 -08:00
Kris Maglione
d25b4ecf0f Bug 1316396: Part 1 - Reorganize parent, child, common, and test code into more appropriate modules. r=aswan
MozReview-Commit-ID: 5WMt69GoN3K
2016-11-10 12:35:22 -08:00
Rob Wu
41872d2a0a Bug 1298979 - Fix LegacyExtensionContext r=aswan
LegacyExtensionContext should inherit from BaseContext instead of
ExtensionContext, because the latter is moving to a separate process.

Remove the optional `url` parameter because the context is not a frame.
`url` is assigned to `sender.url`, which should only be set for frames.
The sender is only used in extension messaging when `runtime.connect` or
`runtime.sendMessage` are used (where `sender.url` is visible at the
receiver). Since legacy extensions don't send messages, there is no
point at all in setting the `url` value.

MozReview-Commit-ID: FJboNC2SZh0
2016-09-06 01:48:58 -07:00
Luca Greco
36fc29ed1f Bug 1252215 - [webext] Add Embedded Extensions helper to LegacyExtensionsUtils. r=aswan,kmag
This patch introduces helper for the embedding of a webextension (and new related tests).

The new exported helpers are going to be integrated in the XPIProvider
to provide the Embedded WebExtension to the Legacy Extensions which
have enabled it in their install.rdf

MozReview-Commit-ID: 7M1DRkXjGat
2016-08-29 15:56:02 +02:00
Luca Greco
ead728d5ad Bug 1252215 - [webext] LegacyExtensionsUtils JSM module and LegacyExtensionContext helper. r=aswan,kmag
- this new module contains helpers to be able to receive connections
  originated from a webextension context from a legacy extension context
  (implemented by the `LegacyExtensionContext` class exported from
  this new jsm module)

- two new test files (an xpcshell-test and a mochitest-browser) ensures that the LegacyExtensionContext can receive a Port
  object and exchange messages with a background page and a content script (the content script test
  is in a different test file because it doesn't currently work on android, because it needs
  the browser.tabs API and the TabManager internal helper)

MozReview-Commit-ID: DS1NTXk0fB6
2016-08-24 18:31:36 +02:00