Update to native Electron 13.1.5, Update Changelog

This commit is contained in:
Gregor Biswanger
2021-07-02 02:04:23 +02:00
parent 305544ab42
commit ce0cdf39c6
55 changed files with 488 additions and 2150 deletions

View File

@@ -194,6 +194,24 @@ module.exports = (socket) => {
}
}
});
socket.on('webContents-session-getAllExtensions', (id) => {
const browserWindow = getWindowById(id);
const extensionsList = browserWindow.webContents.session.getAllExtensions();
const chromeExtensionInfo = [];
Object.keys(extensionsList).forEach(key => {
chromeExtensionInfo.push(extensionsList[key]);
});
electronSocket.emit('webContents-session-getAllExtensions-completed', chromeExtensionInfo);
});
socket.on('webContents-session-removeExtension', (id, name) => {
const browserWindow = getWindowById(id);
browserWindow.webContents.session.removeExtension(name);
});
socket.on('webContents-session-loadExtension', async (id, path, allowFileAccess = false) => {
const browserWindow = getWindowById(id);
const extension = await browserWindow.webContents.session.loadExtension(path, { allowFileAccess: allowFileAccess });
electronSocket.emit('webContents-session-loadExtension-completed', extension);
});
function getWindowById(id) {
if (id >= 1000) {
return browserView_1.browserViewMediateService(id - 1000);