refactor: create IPC_MESSAGES enum for IPC message channels (#25694)
This commit is contained in:
parent
8dfb1cf78f
commit
2c68bad631
26 changed files with 225 additions and 126 deletions
|
@ -1,5 +1,6 @@
|
|||
import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal';
|
||||
import { deserialize } from '@electron/internal/common/type-utils';
|
||||
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
|
||||
|
||||
const { hasSwitch } = process._linkedBinding('electron_common_command_line');
|
||||
|
||||
|
@ -14,5 +15,5 @@ function getCurrentStack () {
|
|||
}
|
||||
|
||||
export async function getSources (options: Electron.SourcesOptions) {
|
||||
return deserialize(await ipcRendererInternal.invoke('ELECTRON_BROWSER_DESKTOP_CAPTURER_GET_SOURCES', options, getCurrentStack()));
|
||||
return deserialize(await ipcRendererInternal.invoke(IPC_MESSAGES.DESKTOP_CAPTURER_GET_SOURCES, options, getCurrentStack()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue