mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 876397 - Inter-App Communication API (part 8, follow-up). r=bent
This commit is contained in:
parent
4646c53fdb
commit
d26d8f8a4f
@ -121,8 +121,7 @@ InterAppConnectionRequestWrapper.prototype = {
|
||||
wrapMessage: function(aMessage, aWindow) {
|
||||
if (DEBUG) debug("wrapMessage: " + JSON.stringify(aMessage));
|
||||
|
||||
let port = new aWindow.MozInterAppMessagePort(aMessage.keyword,
|
||||
aMessage.messagePortID, false);
|
||||
let port = new aWindow.MozInterAppMessagePort(aMessage.messagePortID);
|
||||
let connectionRequest =
|
||||
new aWindow.MozInterAppConnectionRequest(aMessage.keyword, port);
|
||||
|
||||
|
@ -88,13 +88,11 @@ InterAppMessagePort.prototype = {
|
||||
},
|
||||
|
||||
// WebIDL implementation for constructor.
|
||||
__init: function(aKeyword, aMessagePortID) {
|
||||
__init: function(aMessagePortID) {
|
||||
if (DEBUG) {
|
||||
debug("Calling __init(): aKeyword: " + aKeyword +
|
||||
" aMessagePortID: " + aMessagePortID);
|
||||
debug("Calling __init(): aMessagePortID: " + aMessagePortID);
|
||||
}
|
||||
|
||||
this._keyword = aKeyword;
|
||||
this._messagePortID = aMessagePortID;
|
||||
|
||||
cpmm.sendAsyncMessage("InterAppMessagePort:Register",
|
||||
|
@ -639,8 +639,7 @@ WebappsApplication.prototype = {
|
||||
case "Webapps:Connect:Return:OK":
|
||||
let messagePorts = [];
|
||||
msg.messagePortIDs.forEach(function(aPortID) {
|
||||
let port = new this._window.MozInterAppMessagePort(msg.keyword,
|
||||
aPortID, true);
|
||||
let port = new this._window.MozInterAppMessagePort(aPortID);
|
||||
messagePorts.push(port);
|
||||
}, this);
|
||||
req.resolve(messagePorts);
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
[HeaderFile="mozilla/dom/InterAppComm.h",
|
||||
Func="mozilla::dom::InterAppComm::EnabledForScope",
|
||||
Constructor(DOMString keyword, DOMString messagePortID),
|
||||
Constructor(DOMString messagePortID),
|
||||
JSImplementation="@mozilla.org/dom/inter-app-message-port;1"]
|
||||
interface MozInterAppMessagePort : EventTarget {
|
||||
void postMessage(any message);
|
||||
|
Loading…
x
Reference in New Issue
Block a user