From 950e3436c28c842f05fd76ce7350d836c7237f33 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 8 Mar 2017 13:52:04 -0500 Subject: [PATCH] Removed webrtcippolicy attribute from webview --- docs/api/webview-tag.md | 9 +-------- lib/browser/guest-view-manager.js | 3 --- lib/renderer/web-view/web-view-attributes.js | 8 -------- lib/renderer/web-view/web-view-constants.js | 1 - 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/docs/api/webview-tag.md b/docs/api/webview-tag.md index 105dfa1..5efc225 100644 --- a/docs/api/webview-tag.md +++ b/docs/api/webview-tag.md @@ -289,13 +289,6 @@ win.on('resize', () => { }) ``` -### `webrtcippolicy` - -```html - -``` -This attribute allows you to set the WebRTC IP handling policy which controls what IPs are exposed via WebRTC. See [webContents](web-contents.md#contentssetwebrtciphandlingpolicypolicy) for available policies. - ## Methods The `webview` tag has the following methods: @@ -319,7 +312,7 @@ webview.addEventListener('dom-ready', () => { * `userAgent` String (optional) - A user agent originating the request. * `extraHeaders` String (optional) - Extra headers separated by "\n" * `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[] - (optional) - * `baseURLForDataURL` String (optional) - Base url (with trailing path separator) for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files. + * `baseURLForDataURL` String (optional) - Base url (with trailing path separator) for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files. Loads the `url` in the webview, the `url` must contain the protocol prefix, e.g. the `http://` or `file://`. diff --git a/lib/browser/guest-view-manager.js b/lib/browser/guest-view-manager.js index 00b309b..0bfe77d 100644 --- a/lib/browser/guest-view-manager.js +++ b/lib/browser/guest-view-manager.js @@ -103,9 +103,6 @@ const createGuest = function (embedder, params) { height: params.maxheight } }) - if (params.webrtcippolicy) { - guest.setWebRTCIPHandlingPolicy(params.webrtcippolicy) - } if (params.src) { const opts = {} if (params.httpreferrer) { diff --git a/lib/renderer/web-view/web-view-attributes.js b/lib/renderer/web-view/web-view-attributes.js index c8911f5..204046b 100644 --- a/lib/renderer/web-view/web-view-attributes.js +++ b/lib/renderer/web-view/web-view-attributes.js @@ -304,13 +304,6 @@ class DisableBlinkFeaturesAttribute extends WebViewAttribute { } } -// Attribute specifies WebRTC IP handling policy for handling IP leaking. -class WebRTCIPHandlingPolicyAttribute extends WebViewAttribute { - constructor (webViewImpl) { - super(webViewConstants.ATTRIBUTE_WEBRTCIPPOLICY, webViewImpl) - } -} - // Attribute that specifies the web preferences to be enabled. class WebPreferencesAttribute extends WebViewAttribute { constructor (webViewImpl) { @@ -336,7 +329,6 @@ WebViewImpl.prototype.setupWebViewAttributes = function () { this.attributes[webViewConstants.ATTRIBUTE_GUESTINSTANCE] = new GuestInstanceAttribute(this) this.attributes[webViewConstants.ATTRIBUTE_DISABLEGUESTRESIZE] = new BooleanAttribute(webViewConstants.ATTRIBUTE_DISABLEGUESTRESIZE, this) this.attributes[webViewConstants.ATTRIBUTE_WEBPREFERENCES] = new WebPreferencesAttribute(this) - this.attributes[webViewConstants.ATTRIBUTE_WEBRTCIPPOLICY] = new WebRTCIPHandlingPolicyAttribute(this) const autosizeAttributes = [webViewConstants.ATTRIBUTE_MAXHEIGHT, webViewConstants.ATTRIBUTE_MAXWIDTH, webViewConstants.ATTRIBUTE_MINHEIGHT, webViewConstants.ATTRIBUTE_MINWIDTH] autosizeAttributes.forEach((attribute) => { diff --git a/lib/renderer/web-view/web-view-constants.js b/lib/renderer/web-view/web-view-constants.js index 42f8134..bf26018 100644 --- a/lib/renderer/web-view/web-view-constants.js +++ b/lib/renderer/web-view/web-view-constants.js @@ -20,7 +20,6 @@ module.exports = { ATTRIBUTE_GUESTINSTANCE: 'guestinstance', ATTRIBUTE_DISABLEGUESTRESIZE: 'disableguestresize', ATTRIBUTE_WEBPREFERENCES: 'webpreferences', - ATTRIBUTE_WEBRTCIPPOLICY: 'webrtcippolicy', // Internal attribute. ATTRIBUTE_INTERNALINSTANCEID: 'internalinstanceid', -- 2.7.4