Bug 882506 - Remove useless nsBrowserAccess in shell.js r=vingtetun

This commit is contained in:
Fabrice Desré 2013-07-01 09:18:07 -07:00
Родитель 3107735355
Коммит 9810f4eb2e
1 изменённых файлов: 0 добавлений и 34 удалений

Просмотреть файл

@ -482,9 +482,6 @@ var shell = {
this.reportCrash(true);
let chromeWindow = window.QueryInterface(Ci.nsIDOMChromeWindow);
chromeWindow.browserDOMWindow = new nsBrowserAccess();
Cu.import('resource://gre/modules/Webapps.jsm');
DOMApplicationRegistry.allAppsLaunchable = true;
@ -608,37 +605,6 @@ var shell = {
}
};
function nsBrowserAccess() {
}
nsBrowserAccess.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserDOMWindow]),
openURI: function openURI(uri, opener, where, context) {
// TODO This should be replaced by an 'open-browser-window' intent
let content = shell.contentBrowser.contentWindow;
let contentWindow = content.wrappedJSObject;
if (!('getApplicationManager' in contentWindow))
return null;
let applicationManager = contentWindow.getApplicationManager();
if (!applicationManager)
return null;
let url = uri ? uri.spec : 'about:blank';
let window = applicationManager.launch(url, where);
return window.contentWindow;
},
openURIInFrame: function openURIInFrame(uri, opener, where, context) {
throw new Error('Not Implemented');
},
isTabContentWindow: function isTabContentWindow(contentWindow) {
return contentWindow == window;
}
};
// Listen for the request of opening app and relay them to Gaia.
Services.obs.addObserver(function onSystemMessageOpenApp(subject, topic, data) {
let msg = JSON.parse(data);