From 71fd3e807caa40a43b9d453518f37f182021966c Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 16 Feb 2017 04:03:47 +0530 Subject: [PATCH] use sync zoom api with guest view manager webpreferences --- lib/browser/guest-view-manager.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/browser/guest-view-manager.js b/lib/browser/guest-view-manager.js index 83a56827b25e..721da5acc444 100644 --- a/lib/browser/guest-view-manager.js +++ b/lib/browser/guest-view-manager.js @@ -184,6 +184,7 @@ const attachGuest = function (event, elementInstanceId, guestInstanceId, params) guestInstanceId: guestInstanceId, nodeIntegration: params.nodeintegration != null ? params.nodeintegration : false, plugins: params.plugins, + zoomFactor: embedder._getZoomFactor(), webSecurity: !params.disablewebsecurity, blinkFeatures: params.blinkfeatures, disableBlinkFeatures: params.disableblinkfeatures @@ -212,18 +213,15 @@ const attachGuest = function (event, elementInstanceId, guestInstanceId, params) return } - embedder.getZoomFactor(function (zoomFactor) { - webPreferences.zoomFactor = zoomFactor - webViewManager.addGuest(guestInstanceId, elementInstanceId, embedder, guest, webPreferences) - guest.attachParams = params - embedderElementsMap[key] = guestInstanceId + webViewManager.addGuest(guestInstanceId, elementInstanceId, embedder, guest, webPreferences) + guest.attachParams = params + embedderElementsMap[key] = guestInstanceId - guest.setEmbedder(embedder) - guestInstance.embedder = embedder - guestInstance.elementInstanceId = elementInstanceId + guest.setEmbedder(embedder) + guestInstance.embedder = embedder + guestInstance.elementInstanceId = elementInstanceId - watchEmbedder(embedder) - }) + watchEmbedder(embedder) } // Destroy an existing guest instance.