Right before navigate, set the user agent

This commit is contained in:
Paul Betts 2015-05-05 16:25:16 -07:00
parent 3a81a5224d
commit 4a8d7c1819

View file

@ -160,7 +160,12 @@ class SrcAttribute extends WebViewAttribute
# Navigate to |this.src|.
httpreferrer = @webViewImpl.attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER].getValue()
urlOptions = if httpreferrer then {httpreferrer} else {}
remote.getGuestWebContents(@webViewImpl.guestInstanceId).loadUrl @getValue(), urlOptions
useragent = @webViewImpl.attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER].getValue()
guestContents = remote.getGuestWebContents(@webViewImpl.guestInstanceId)
guestContents.setUserAgent(guestContents) if guestContents
guestContents.loadUrl @getValue(), urlOptions
# Attribute specifies HTTP referrer.
class HttpReferrerAttribute extends WebViewAttribute