From 133cfc78fa9776080f8cf76e4799ef054c246394 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 24 Mar 2015 18:36:05 +0100 Subject: [PATCH] Remove obsolete CPOW code from PdfjsContentUtils.jsm (PR 5749 followup) This code is unused since PR 5749, and according to https://github.com/mozilla/pdf.js/pull/5749#discussion_r25931841 it should be removed. --- .../firefox/content/PdfjsContentUtils.jsm | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/extensions/firefox/content/PdfjsContentUtils.jsm b/extensions/firefox/content/PdfjsContentUtils.jsm index b86bd18ce..0187f4403 100644 --- a/extensions/firefox/content/PdfjsContentUtils.jsm +++ b/extensions/firefox/content/PdfjsContentUtils.jsm @@ -149,55 +149,5 @@ let PdfjsContentUtils = { } break; } - }, - - /* - * CPOWs - */ - - getChromeWindow: function (aWindow) { - let winmm = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDocShell) - .sameTypeRootTreeItem - .QueryInterface(Ci.nsIDocShell) - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIContentFrameMessageManager); - // Sync calls don't support cpow wrapping of returned results, so we - // send over a small container for the object we want. - let suitcase = { - _window: null, - setChromeWindow: function (aObj) { - this._window = aObj; - } - }; - if (!winmm.sendSyncMessage('PDFJS:Parent:getChromeWindow', {}, - { suitcase: suitcase })[0]) { - Cu.reportError('A request for a CPOW wrapped chrome window ' + - 'failed for unknown reasons.'); - return null; - } - return suitcase._window; - }, - - getFindBar: function (aWindow) { - let winmm = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDocShell) - .sameTypeRootTreeItem - .QueryInterface(Ci.nsIDocShell) - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIContentFrameMessageManager); - let suitcase = { - _findbar: null, - setFindBar: function (aObj) { - this._findbar = aObj; - } - }; - if (!winmm.sendSyncMessage('PDFJS:Parent:getFindBar', {}, - { suitcase: suitcase })[0]) { - Cu.reportError('A request for a CPOW wrapped findbar ' + - 'failed for unknown reasons.'); - return null; - } - return suitcase._findbar; } };