2018-09-22 12:28:50 +00:00
|
|
|
'use strict'
|
|
|
|
|
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
|
|
|
|
|
|
|
const enableRemoteModule = v8Util.getHiddenValue(global, 'enableRemoteModule')
|
2018-06-13 16:15:34 +00:00
|
|
|
|
2017-03-06 14:58:10 +00:00
|
|
|
// Renderer side modules, please sort alphabetically.
|
2018-06-13 16:15:34 +00:00
|
|
|
// A module is `enabled` if there is no explicit condition defined.
|
2017-03-06 14:58:10 +00:00
|
|
|
module.exports = [
|
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()) {
|
|
|
|
module.exports.push({ name: 'desktopCapturer', loader: () => require('./desktop-capturer') })
|
|
|
|
}
|
|
|
|
|
|
|
|
if (enableRemoteModule) {
|
|
|
|
module.exports.push({ name: 'remote', loader: () => require('./remote') })
|
|
|
|
}
|