2019-03-18 19:37:06 +00:00
|
|
|
const features = process.electronBinding('features')
|
|
|
|
const v8Util = process.electronBinding('v8_util')
|
2018-10-13 17:50:07 +00:00
|
|
|
|
2019-08-23 09:18:58 +00:00
|
|
|
const enableRemoteModule = v8Util.getHiddenValue<boolean>(global, 'enableRemoteModule')
|
2018-06-13 16:15:34 +00:00
|
|
|
|
2017-03-06 14:58:10 +00:00
|
|
|
// Renderer side modules, please sort alphabetically.
|
2019-08-23 09:18:58 +00:00
|
|
|
export const rendererModuleList: ElectronInternal.ModuleEntry[] = [
|
2019-10-18 19:57:09 +00:00
|
|
|
{ name: 'contextBridge', loader: () => require('./context-bridge') },
|
2019-06-02 20:03:03 +00:00
|
|
|
{ name: 'crashReporter', loader: () => require('./crash-reporter') },
|
|
|
|
{ name: 'ipcRenderer', loader: () => require('./ipc-renderer') },
|
|
|
|
{ name: 'webFrame', loader: () => require('./web-frame') }
|
2017-03-06 14:58:10 +00:00
|
|
|
]
|
2019-06-02 20:03:03 +00:00
|
|
|
|
|
|
|
if (features.isDesktopCapturerEnabled()) {
|
2019-08-23 09:18:58 +00:00
|
|
|
rendererModuleList.push({ name: 'desktopCapturer', loader: () => require('./desktop-capturer') })
|
2019-06-02 20:03:03 +00:00
|
|
|
}
|
|
|
|
|
2019-09-18 16:52:06 +00:00
|
|
|
if (features.isRemoteModuleEnabled() && enableRemoteModule) {
|
2019-08-23 09:18:58 +00:00
|
|
|
rendererModuleList.push({ name: 'remote', loader: () => require('./remote') })
|
2019-06-02 20:03:03 +00:00
|
|
|
}
|