refactor: remove code for non-native extensions shim (#23340)

This commit is contained in:
Jeremy Apthorp 2020-04-30 09:38:09 -07:00 committed by GitHub
parent 3e5486323a
commit 8d0a612265
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 5 additions and 1175 deletions

View file

@ -96,21 +96,12 @@ const getPreloadScript = async function (preloadPath) {
return { preloadPath, preloadSrc, preloadError };
};
if (features.isExtensionsEnabled()) {
ipcMainUtils.handleSync('ELECTRON_GET_CONTENT_SCRIPTS', () => []);
} else {
const { getContentScripts } = require('@electron/internal/browser/chrome-extension');
ipcMainUtils.handleSync('ELECTRON_GET_CONTENT_SCRIPTS', () => getContentScripts());
}
ipcMainUtils.handleSync('ELECTRON_GET_CONTENT_SCRIPTS', () => []);
ipcMainUtils.handleSync('ELECTRON_BROWSER_SANDBOX_LOAD', async function (event) {
const preloadPaths = event.sender._getPreloadPaths();
let contentScripts = [];
if (!features.isExtensionsEnabled()) {
const { getContentScripts } = require('@electron/internal/browser/chrome-extension');
contentScripts = getContentScripts();
}
const contentScripts = [];
const webPreferences = event.sender.getLastWebPreferences() || {};