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

Unified Diff: chrome/content/ui/sendReport.js

Issue 29338283: Issue 3499 - Use the new messaging API for the issue reporter (Closed)
Patch Set: Created March 15, 2016, 10:57 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 | « no previous file | lib/child/dataCollector.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/ui/sendReport.js
===================================================================
--- a/chrome/content/ui/sendReport.js
+++ b/chrome/content/ui/sendReport.js
@@ -312,19 +312,21 @@ var subscriptionsDataSource =
callback();
}
};
var remoteDataSource =
{
collectData: function(outerWindowID, windowURI, browser, callback)
{
- let dataCollector = require("dataCollector");
+ let {port} = require("messaging");
let screenshotWidth = screenshotDataSource.getWidth();
- dataCollector.collectData(outerWindowID, screenshotWidth, data => {
+ port.emitWithResponse("collectData", {outerWindowID, screenshotWidth})
+ .then(data =>
+ {
screenshotDataSource.setData(data && data.screenshot);
framesDataSource.setData(windowURI, data && data.opener, data && data.referrer, data && data.frames);
if (data && data.isPrivate)
isPrivate = true;
let element = reportElement("options");
appendElement(element, "option", {id: "privateBrowsing"}, isPrivate);
« no previous file with comments | « no previous file | lib/child/dataCollector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld