commit
b6ec11c81e
@ -33,10 +33,8 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ******/
|
* ***** END LICENSE BLOCK ******/
|
||||||
|
|
||||||
const IOService = Components.classes['@mozilla.org/network/io-service;1']
|
|
||||||
.getService(Components.interfaces.nsIIOService);
|
|
||||||
|
|
||||||
Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
|
Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||||
|
Components.utils.import('resource://gre/modules/Services.jsm');
|
||||||
|
|
||||||
function AboutGroup()
|
function AboutGroup()
|
||||||
{
|
{
|
||||||
@ -49,7 +47,7 @@ AboutGroup.prototype = {
|
|||||||
|
|
||||||
newChannel : function(aURI)
|
newChannel : function(aURI)
|
||||||
{
|
{
|
||||||
return IOService.newChannel('chrome://treestyletab/content/group.xul', null, null);
|
return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null);
|
||||||
},
|
},
|
||||||
|
|
||||||
getURIFlags : function(aURI)
|
getURIFlags : function(aURI)
|
||||||
|
@ -48,8 +48,7 @@ const SSS = Cc['@mozilla.org/content/style-sheet-service;1']
|
|||||||
.getService(Ci.nsIStyleSheetService);
|
.getService(Ci.nsIStyleSheetService);
|
||||||
const SecMan = Cc['@mozilla.org/scriptsecuritymanager;1']
|
const SecMan = Cc['@mozilla.org/scriptsecuritymanager;1']
|
||||||
.getService(Ci.nsIScriptSecurityManager);
|
.getService(Ci.nsIScriptSecurityManager);
|
||||||
const IOService = Services.io;
|
|
||||||
|
|
||||||
function TabbarDNDObserver(aTabBrowser)
|
function TabbarDNDObserver(aTabBrowser)
|
||||||
{
|
{
|
||||||
this.init(aTabBrowser);
|
this.init(aTabBrowser);
|
||||||
@ -1151,7 +1150,7 @@ catch(e) {
|
|||||||
.split('\n')[0]];
|
.split('\n')[0]];
|
||||||
|
|
||||||
case 'application/x-moz-file':
|
case 'application/x-moz-file':
|
||||||
let fileHandler = IOService.getProtocolHandler('file')
|
let fileHandler = Services.io.getProtocolHandler('file')
|
||||||
.QueryInterface(Ci.nsIFileProtocolHandler);
|
.QueryInterface(Ci.nsIFileProtocolHandler);
|
||||||
return [fileHandler.getURLSpecFromFile(aData)];
|
return [fileHandler.getURLSpecFromFile(aData)];
|
||||||
}
|
}
|
||||||
|
@ -276,14 +276,6 @@ var TreeStyleTabUtils = {
|
|||||||
},
|
},
|
||||||
_SessionStore : null,
|
_SessionStore : null,
|
||||||
|
|
||||||
get IOService() {
|
|
||||||
if (!this._IOService) {
|
|
||||||
this._IOService = Services.io;
|
|
||||||
}
|
|
||||||
return this._IOService;
|
|
||||||
},
|
|
||||||
_IOService : null,
|
|
||||||
|
|
||||||
get WindowMediator() {
|
get WindowMediator() {
|
||||||
if (!this._WindowMediator) {
|
if (!this._WindowMediator) {
|
||||||
this._WindowMediator = Services.wm;
|
this._WindowMediator = Services.wm;
|
||||||
@ -1141,13 +1133,13 @@ var TreeStyleTabUtils = {
|
|||||||
var newURI;
|
var newURI;
|
||||||
aURI = aURI || '';
|
aURI = aURI || '';
|
||||||
if (aURI && String(aURI).indexOf('file:') == 0) {
|
if (aURI && String(aURI).indexOf('file:') == 0) {
|
||||||
var fileHandler = this.IOService.getProtocolHandler('file').QueryInterface(Ci.nsIFileProtocolHandler);
|
var fileHandler = Services.io.getProtocolHandler('file').QueryInterface(Ci.nsIFileProtocolHandler);
|
||||||
var tempLocalFile = fileHandler.getFileFromURLSpec(aURI);
|
var tempLocalFile = fileHandler.getFileFromURLSpec(aURI);
|
||||||
newURI = this.IOService.newFileURI(tempLocalFile);
|
newURI = Services.io.newFileURI(tempLocalFile);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!/^\w+\:/.test(aURI)) aURI = 'http://'+aURI;
|
if (!/^\w+\:/.test(aURI)) aURI = 'http://'+aURI;
|
||||||
newURI = this.IOService.newURI(aURI, null, null);
|
newURI = Services.io.newURI(aURI, null, null);
|
||||||
}
|
}
|
||||||
return newURI;
|
return newURI;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user