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: Addressed comments Created April 19, 2016, 11:56 a.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
« no previous file with comments | « 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 addUserCSS(window, cssCode)
{
let uri = Services.io.newURI("data:text/css," + encodeURIComponent(cssCode),
« no previous file with comments | « ext/content.js ('k') | lib/cssProperties.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld