refactor: enforce naming of ipcMainInternal (#16689)

This commit is contained in:
Samuel Attard 2019-02-04 14:49:53 -08:00 committed by GitHub
parent cacb56b103
commit af64140100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 45 additions and 43 deletions

View file

@ -1,6 +1,6 @@
'use strict'
const ipcMain = require('@electron/internal/browser/ipc-main-internal')
const { ipcMainInternal } = require('@electron/internal/browser/ipc-main-internal')
const { desktopCapturer } = process.atomBinding('desktop_capturer')
const eventBinding = process.atomBinding('event')
@ -13,7 +13,7 @@ let requestsQueue = []
const electronSources = 'ELECTRON_BROWSER_DESKTOP_CAPTURER_GET_SOURCES'
const capturerResult = (id) => `ELECTRON_RENDERER_DESKTOP_CAPTURER_RESULT_${id}`
ipcMain.on(electronSources, (event, captureWindow, captureScreen, thumbnailSize, fetchWindowIcons, id) => {
ipcMainInternal.on(electronSources, (event, captureWindow, captureScreen, thumbnailSize, fetchWindowIcons, id) => {
const customEvent = eventBinding.createWithSender(event.sender)
event.sender.emit('desktop-capturer-get-sources', customEvent)