Use GuestWindowManager to mange windows created by window.open

This commit is contained in:
Cheng Zhao 2014-10-27 21:56:04 +08:00
parent 9c92f2e692
commit 6f41598962
7 changed files with 77 additions and 10 deletions

View file

@ -441,6 +441,7 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
.SetMethod("_send", &WebContents::SendIPCMessage)
.SetMethod("setAutoSize", &WebContents::SetAutoSize)
.SetMethod("setAllowTransparency", &WebContents::SetAllowTransparency)
.SetMethod("isGuest", &WebContents::is_guest)
.Build());
return mate::ObjectTemplateBuilder(

View file

@ -2,10 +2,6 @@ EventEmitter = require('events').EventEmitter
binding = process.atomBinding 'web_contents'
ipc = require 'ipc'
# Routed window.open messages.
ipc.on 'ATOM_SHELL_WEB_CONTENTS_WINDOW_OPEN', (event, args...) ->
event.sender.emit 'new-window', event, args...
module.exports.wrap = (webContents) ->
return null unless webContents.isAlive()