2020-03-20 20:28:31 +00:00
|
|
|
'use strict';
|
2019-06-02 20:03:03 +00:00
|
|
|
|
|
|
|
// TODO: Figure out a way to not duplicate this information between here and module-list
|
|
|
|
// It is currently duplicated as module-list "require"s all the browser API file and the
|
|
|
|
// remote module in the renderer process depends on that file. As a result webpack
|
|
|
|
// includes all the browser API files in the renderer process as well and we want to avoid that
|
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
const features = process.electronBinding('features');
|
2019-06-02 20:03:03 +00:00
|
|
|
|
|
|
|
// Browser side modules, please sort alphabetically.
|
|
|
|
module.exports = [
|
|
|
|
{ name: 'app' },
|
|
|
|
{ name: 'autoUpdater' },
|
|
|
|
{ name: 'BrowserView' },
|
|
|
|
{ name: 'BrowserWindow' },
|
|
|
|
{ name: 'contentTracing' },
|
|
|
|
{ name: 'crashReporter' },
|
|
|
|
{ name: 'dialog' },
|
|
|
|
{ name: 'globalShortcut' },
|
|
|
|
{ name: 'ipcMain' },
|
|
|
|
{ name: 'inAppPurchase' },
|
|
|
|
{ name: 'Menu' },
|
|
|
|
{ name: 'MenuItem' },
|
2019-11-04 22:17:03 +00:00
|
|
|
{ name: 'nativeTheme' },
|
2019-06-02 20:03:03 +00:00
|
|
|
{ name: 'net' },
|
|
|
|
{ name: 'netLog' },
|
2020-03-12 01:07:54 +00:00
|
|
|
{ name: 'MessageChannelMain' },
|
2019-06-02 20:03:03 +00:00
|
|
|
{ name: 'Notification' },
|
|
|
|
{ name: 'powerMonitor' },
|
|
|
|
{ name: 'powerSaveBlocker' },
|
|
|
|
{ name: 'protocol' },
|
|
|
|
{ name: 'screen' },
|
|
|
|
{ name: 'session' },
|
|
|
|
{ name: 'systemPreferences' },
|
|
|
|
{ name: 'TopLevelWindow' },
|
|
|
|
{ name: 'TouchBar' },
|
|
|
|
{ name: 'Tray' },
|
|
|
|
{ name: 'View' },
|
|
|
|
{ name: 'webContents' },
|
|
|
|
{ name: 'WebContentsView' }
|
2020-03-20 20:28:31 +00:00
|
|
|
];
|
2019-06-02 20:03:03 +00:00
|
|
|
|
|
|
|
if (features.isViewApiEnabled()) {
|
|
|
|
module.exports.push(
|
2020-03-28 06:44:57 +00:00
|
|
|
{ name: 'ImageView' }
|
2020-03-20 20:28:31 +00:00
|
|
|
);
|
2019-06-02 20:03:03 +00:00
|
|
|
}
|