use sync zoom api with guest view manager webpreferences

This commit is contained in:
deepak1556 2017-02-16 04:03:47 +05:30
parent 763b9ab8d8
commit 71fd3e807c

View file

@ -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.