Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/child/cssProperties.js

Issue 29338928: Issue 3853 - Use new messaging API for the first-run page (Closed)
Patch Set: Created March 22, 2016, 1:54 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ext/common.js ('K') | « ext/content.js ('k') | lib/cssProperties.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/child/cssProperties.js
===================================================================
--- a/lib/child/cssProperties.js
+++ b/lib/child/cssProperties.js
@@ -24,23 +24,23 @@
let {port} = require("messaging");
let {getFrames} = require("child/utils");
let senderWindow = null;
let scope = {
ext: {
backgroundPage: {
- sendMessage: function(data, callback)
+ sendMessage: function(payload, callback)
{
- data = {payload: data, frames: getFrames(senderWindow)};
+ let message = {payload, frames: getFrames(senderWindow)};
if (typeof callback == "function")
- port.emitWithResponse("cssPropertiesRequest", data).then(callback);
+ port.emitWithResponse("ext_message", message).then(callback);
else
- port.emit("cssPropertiesRequest", data);
+ port.emit("ext_message", message);
}
}
}
};
function loadScript(script)
{
Services.scriptloader.loadSubScript(script, scope);
« ext/common.js ('K') | « ext/content.js ('k') | lib/cssProperties.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld