Add support for setting http referrer

- Add url option to specify the http referrer
- Add httpReferrer attribute to webview

NOTE: This is still not complete. Some love has to be done to
guest-view-manager.coffee and very likely the function calls called
createGuest and to the code that uses them.
This commit is contained in:
Frank Hale 2014-11-06 14:29:41 -05:00
parent fea5559fbc
commit f56d1ea7b4
6 changed files with 61 additions and 16 deletions

View file

@ -47,7 +47,7 @@ createGuest = (embedder, params) ->
max = width: params.maxwidth, height: params.maxheight
@setAutoSize params.autosize, min, max
if params.src
@loadUrl params.src
@loadUrl params.src, params.urlOptions
if params.allowtransparency?
@setAllowTransparency params.allowtransparency

View file

@ -7,11 +7,11 @@ frameToGuest = {}
createGuest = (embedder, url, frameName, options) ->
guest = frameToGuest[frameName]
if frameName and guest?
guest.loadUrl url
guest.loadUrl url {}
return guest.id
guest = new BrowserWindow(options)
guest.loadUrl url
guest.loadUrl url {}
# When |embedder| is destroyed we should also destroy attached guest, and if
# guest is closed by user then we should prevent |embedder| from double