mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add MessageRegistry
The MessageRegistry is similar to the CommandRegistry in that it maps string message types to callback functions; however, messages are dispatched to Atom from outside the application using URIs, and so should be more restrictive about what they allow. Signed-off-by: Katrina Uychaco <kuychaco@github.com>
This commit is contained in:
@@ -235,6 +235,14 @@ class ApplicationDelegate
|
||||
new Disposable ->
|
||||
ipcRenderer.removeListener('context-command', outerCallback)
|
||||
|
||||
onUrlMessage: (callback) ->
|
||||
outerCallback = (event, args...) ->
|
||||
callback(args...)
|
||||
|
||||
ipcRenderer.on('url-message', outerCallback)
|
||||
new Disposable ->
|
||||
ipcRenderer.removeListener('url-message', outerCallback)
|
||||
|
||||
didCancelWindowUnload: ->
|
||||
ipcRenderer.send('did-cancel-window-unload')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user