Merge pull request #5878 from Snuffleupagus/pr-5749-followup

PR 5749 followup
This commit is contained in:
Yury Delendik 2015-03-24 22:13:55 -05:00
commit 64d49e1397
2 changed files with 0 additions and 57 deletions

View File

@ -63,13 +63,6 @@ function getContainingBrowser(domWindow) {
.chromeEventHandler; .chromeEventHandler;
} }
function getChromeWindow(domWindow) {
if (PdfjsContentUtils.isRemote) {
return PdfjsContentUtils.getChromeWindow(domWindow);
}
return getContainingBrowser(domWindow).ownerDocument.defaultView;
}
function getFindBar(domWindow) { function getFindBar(domWindow) {
if (PdfjsContentUtils.isRemote) { if (PdfjsContentUtils.isRemote) {
throw new Error('FindBar is not accessible from the content process.'); throw new Error('FindBar is not accessible from the content process.');

View File

@ -149,55 +149,5 @@ let PdfjsContentUtils = {
} }
break; 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;
} }
}; };