2020-06-23 03:32:45 +00:00
|
|
|
const v8Util = process._linkedBinding('electron_common_v8_util');
|
2018-10-13 17:50:07 +00:00
|
|
|
|
2020-03-20 20:28:31 +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') }
|
2020-03-20 20:28:31 +00:00
|
|
|
];
|
2019-06-02 20:03:03 +00:00
|
|
|
|
2020-05-10 23:06:07 +00:00
|
|
|
if (BUILDFLAG(ENABLE_DESKTOP_CAPTURER)) {
|
|
|
|
rendererModuleList.push({
|
|
|
|
name: 'desktopCapturer',
|
|
|
|
loader: () => require('@electron/internal/renderer/api/desktop-capturer')
|
|
|
|
});
|
2019-06-02 20:03:03 +00:00
|
|
|
}
|
|
|
|
|
2020-05-10 23:06:07 +00:00
|
|
|
if (BUILDFLAG(ENABLE_REMOTE_MODULE) && enableRemoteModule) {
|
|
|
|
rendererModuleList.push({
|
|
|
|
name: 'remote',
|
|
|
|
loader: () => require('@electron/internal/renderer/api/remote')
|
|
|
|
});
|
2019-06-02 20:03:03 +00:00
|
|
|
}
|