Implement GuestViewInternal.createGuest and destroyGuest

This commit is contained in:
Cheng Zhao 2014-10-23 17:54:52 +08:00
parent d34cff2eef
commit a22a5c67bd
8 changed files with 124 additions and 16 deletions

View file

@ -0,0 +1,12 @@
ipc = require 'ipc'
requestId = 0
module.exports =
createGuest: (type, params, callback) ->
requestId++
ipc.send 'ATOM_SHELL_GUEST_VIEW_MANAGER_CREATE_GUEST', type, params, requestId
ipc.on "ATOM_SHELL_RESPONSE_#{requestId}", callback
destroyGuest: (guestInstanceId) ->
ipc.send 'ATOM_SHELL_GUEST_VIEW_MANAGER_DESTROY_GUEST', guestInstanceId