Move all sources under atom/.
This commit is contained in:
parent
26ddbbb0ee
commit
516d46444d
217 changed files with 519 additions and 519 deletions
20
atom/browser/api/lib/protocol.coffee
Normal file
20
atom/browser/api/lib/protocol.coffee
Normal file
|
@ -0,0 +1,20 @@
|
|||
protocol = process.atomBinding 'protocol'
|
||||
EventEmitter = require('events').EventEmitter
|
||||
|
||||
protocol[key] = value for key, value of EventEmitter.prototype
|
||||
|
||||
protocol.RequestStringJob =
|
||||
class RequestStringJob
|
||||
constructor: ({mimeType, charset, data}) ->
|
||||
if typeof data isnt 'string' and not data instanceof Buffer
|
||||
throw new TypeError('Data should be string or Buffer')
|
||||
|
||||
@mimeType = mimeType ? 'text/plain'
|
||||
@charset = charset ? 'UTF-8'
|
||||
@data = String data
|
||||
|
||||
protocol.RequestFileJob =
|
||||
class RequestFileJob
|
||||
constructor: (@path) ->
|
||||
|
||||
module.exports = protocol
|
Loading…
Add table
Add a link
Reference in a new issue