Bug 876397 - Inter-App Communication API (part 8, follow-up). r=bent

This commit is contained in:
Gene Lian 2013-09-12 22:14:48 +08:00
parent 4646c53fdb
commit d26d8f8a4f
4 changed files with 5 additions and 9 deletions

View File

@ -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);

View File

@ -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",

View File

@ -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);

View File

@ -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);