Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #4 from brave/insecure-content
Browse files Browse the repository at this point in the history
add webview settings for secure display and running of content
  • Loading branch information
bbondy committed Jan 15, 2016
2 parents 9dc98b1 + 3fed5e6 commit 1fee9a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions atom/browser/lib/guest-view-manager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ attachGuest = (embedder, elementInstanceId, guestInstanceId, params) ->
guestInstanceId: guestInstanceId
nodeIntegration: params.nodeintegration ? false
plugins: params.plugins
allowDisplayingInsecureContent: params.allowDisplayingInsecureContent ? false
allowRunningInsecureContent: params.allowRunningInsecureContent ? false
webSecurity: !params.disablewebsecurity
webPreferences.preloadURL = params.preload if params.preload

Expand Down
2 changes: 2 additions & 0 deletions atom/renderer/lib/web-view/web-view-attributes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ WebViewImpl::setupWebViewAttributes = ->
@attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER] = new HttpReferrerAttribute(this)
@attributes[webViewConstants.ATTRIBUTE_USERAGENT] = new UserAgentAttribute(this)
@attributes[webViewConstants.ATTRIBUTE_NODEINTEGRATION] = new BooleanAttribute(webViewConstants.ATTRIBUTE_NODEINTEGRATION, this)
@attributes[webViewConstants.ATTRIBUTE_ALLOWDISPLAYINGINSECURECONTENT] = new BooleanAttribute(webViewConstants.ATTRIBUTE_ALLOWDISPLAYINGINSECURECONTENT, this)
@attributes[webViewConstants.ATTRIBUTE_ALLOWRUNNINGINSECURECONTENT] = new BooleanAttribute(webViewConstants.ATTRIBUTE_ALLOWRUNNINGINSECURECONTENT, this)
@attributes[webViewConstants.ATTRIBUTE_PLUGINS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_PLUGINS, this)
@attributes[webViewConstants.ATTRIBUTE_DISABLEWEBSECURITY] = new BooleanAttribute(webViewConstants.ATTRIBUTE_DISABLEWEBSECURITY, this)
@attributes[webViewConstants.ATTRIBUTE_ALLOWPOPUPS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_ALLOWPOPUPS, this)
Expand Down
2 changes: 2 additions & 0 deletions atom/renderer/lib/web-view/web-view-constants.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module.exports =
ATTRIBUTE_SRC: 'src'
ATTRIBUTE_HTTPREFERRER: 'httpreferrer'
ATTRIBUTE_NODEINTEGRATION: 'nodeintegration'
ATTRIBUTE_ALLOWDISPLAYINGINSECURECONTENT: 'allowDisplayingInsecureContent'
ATTRIBUTE_ALLOWRUNNINGINSECURECONTENT: 'allowRunningInsecureContent'
ATTRIBUTE_PLUGINS: 'plugins'
ATTRIBUTE_DISABLEWEBSECURITY: 'disablewebsecurity'
ATTRIBUTE_ALLOWPOPUPS: 'allowpopups'
Expand Down

0 comments on commit 1fee9a3

Please sign in to comment.