Reporting print usage
This commit is contained in:
parent
a45e10337c
commit
7ac1c6b034
@ -32,6 +32,7 @@ Telemetry.registerAddonHistogram(ADDON_ID, "PDF_VIEWER_DOCUMENT_VERSION", 1, 10,
|
||||
Telemetry.registerAddonHistogram(ADDON_ID, "PDF_VIEWER_DOCUMENT_GENERATOR", 1, 25, 26, Telemetry.HISTOGRAM_LINEAR);
|
||||
Telemetry.registerAddonHistogram(ADDON_ID, "PDF_VIEWER_DOCUMENT_SIZE_KB", 2, 64 * 1024, 20, Telemetry.HISTOGRAM_EXPONENTIAL);
|
||||
Telemetry.registerAddonHistogram(ADDON_ID, "PDF_VIEWER_FORM", 1, 2, 3, Telemetry.HISTOGRAM_BOOLEAN);
|
||||
Telemetry.registerAddonHistogram(ADDON_ID, "PDF_VIEWER_PRINT", 1, 2, 3, Telemetry.HISTOGRAM_BOOLEAN);
|
||||
Telemetry.registerAddonHistogram(ADDON_ID, "PDF_VIEWER_STREAM_TYPES", 1, 9, 10, Telemetry.HISTOGRAM_LINEAR);
|
||||
Telemetry.registerAddonHistogram(ADDON_ID, "PDF_VIEWER_TIME_TO_VIEW_MS", 1, 10000, 50, Telemetry.HISTOGRAM_EXPONENTIAL);
|
||||
|
||||
@ -61,6 +62,10 @@ this.PdfJsTelemetry = {
|
||||
let histogram = Telemetry.getAddonHistogram(ADDON_ID, "PDF_VIEWER_FORM");
|
||||
histogram.add(isAcroform);
|
||||
},
|
||||
onPrint: function () {
|
||||
let histogram = Telemetry.getAddonHistogram(ADDON_ID, "PDF_VIEWER_PRINT");
|
||||
histogram.add(true);
|
||||
},
|
||||
onStreamType: function (streamTypeId) {
|
||||
let histogram = Telemetry.getAddonHistogram(ADDON_ID, "PDF_VIEWER_STREAM_TYPES");
|
||||
histogram.add(streamTypeId);
|
||||
|
@ -48,6 +48,10 @@ this.PdfJsTelemetry = {
|
||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_FORM");
|
||||
histogram.add(isAcroform);
|
||||
},
|
||||
onPrint: function () {
|
||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_PRINT");
|
||||
histogram.add(true);
|
||||
},
|
||||
onStreamType: function (streamTypeId) {
|
||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_STREAM_TYPES");
|
||||
histogram.add(streamTypeId);
|
||||
|
@ -401,6 +401,9 @@ ChromeActions.prototype = {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'print':
|
||||
PdfJsTelemetry.onPrint();
|
||||
break;
|
||||
}
|
||||
},
|
||||
fallback: function(args, sendResponse) {
|
||||
|
@ -1570,6 +1570,12 @@ var PDFView = {
|
||||
for (i = 0, ii = this.pages.length; i < ii; ++i) {
|
||||
this.pages[i].beforePrint();
|
||||
}
|
||||
|
||||
//#if (FIREFOX || MOZCENTRAL)
|
||||
// FirefoxCom.request('reportTelemetry', JSON.stringify({
|
||||
// type: 'print'
|
||||
// }));
|
||||
//#endif
|
||||
},
|
||||
|
||||
afterPrint: function pdfViewSetupAfterPrint() {
|
||||
|
Loading…
Reference in New Issue
Block a user