build: add enable_remote_module build flag (#19821)

This commit is contained in:
Milan Burda 2019-09-18 09:52:06 -07:00 committed by Alexey Kuzmin
parent 8bf74164e2
commit 11cd0db86b
32 changed files with 585 additions and 497 deletions

View file

@ -151,11 +151,17 @@ app._setDefaultAppPaths(packagePath)
// Load the chrome devtools support.
require('@electron/internal/browser/devtools')
const features = process.electronBinding('features')
// Load the chrome extension support.
if (!process.electronBinding('features').isExtensionsEnabled()) {
if (!features.isExtensionsEnabled()) {
require('@electron/internal/browser/chrome-extension')
}
if (features.isRemoteModuleEnabled()) {
require('@electron/internal/browser/remote/server')
}
// Load protocol module to ensure it is populated on app ready
require('@electron/internal/browser/api/protocol')