refactor: remove code for non-native extensions shim (#23340)
This commit is contained in:
parent
3e5486323a
commit
8d0a612265
13 changed files with 5 additions and 1175 deletions
|
@ -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() || {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue