Allow returning file for custom protocol.

This commit is contained in:
Cheng Zhao 2013-08-25 16:06:29 +08:00
parent 1ed77371c0
commit 244d7eaf17
4 changed files with 40 additions and 1 deletions

View file

@ -45,6 +45,10 @@ app.on('will-finish-launching', function() {
protocol.registerProtocol('atom-string-job', function(url) {
return new protocol.RequestStringJob({mimeType: 'text/html', data: url});
});
protocol.registerProtocol('atom-file-job', function(url) {
return new protocol.RequestFileJob(url.substr(16));
});
});
app.on('finish-launching', function() {