chore: rename atomBinding to electronBinding (#17419)
This commit is contained in:
parent
5025c991ee
commit
38d75010c7
81 changed files with 167 additions and 164 deletions
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const clipboard = process.atomBinding('clipboard')
|
||||
const clipboard = process.electronBinding('clipboard')
|
||||
|
||||
if (process.type === 'renderer') {
|
||||
const ipcRendererUtils = require('@electron/internal/renderer/ipc-renderer-internal-utils')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { nativeImage } = process.atomBinding('native_image')
|
||||
const { nativeImage } = process.electronBinding('native_image')
|
||||
|
||||
module.exports = nativeImage
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
'use strict'
|
||||
|
||||
module.exports = process.atomBinding('shell')
|
||||
module.exports = process.electronBinding('shell')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export function atomBindingSetup (binding: typeof process['_linkedBinding'], processType: typeof process['type']): typeof process['atomBinding'] {
|
||||
return function atomBinding (name: string) {
|
||||
export function electronBindingSetup (binding: typeof process['_linkedBinding'], processType: typeof process['type']): typeof process['electronBinding'] {
|
||||
return function electronBinding (name: string) {
|
||||
try {
|
||||
return binding(`atom_${processType}_${name}`)
|
||||
} catch (error) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const { nativeImage, NativeImage } = process.atomBinding('native_image')
|
||||
const { nativeImage, NativeImage } = process.electronBinding('native_image')
|
||||
|
||||
const objectMap = function (source, mapper) {
|
||||
const sourceEntries = Object.entries(source)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const binding = process.atomBinding('crash_reporter')
|
||||
const binding = process.electronBinding('crash_reporter')
|
||||
|
||||
class CrashReporter {
|
||||
contructor () {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as timers from 'timers'
|
||||
import * as util from 'util'
|
||||
|
||||
import { atomBindingSetup } from '@electron/internal/common/atom-binding-setup'
|
||||
import { electronBindingSetup } from '@electron/internal/common/atom-binding-setup'
|
||||
|
||||
process.atomBinding = atomBindingSetup(process._linkedBinding, process.type)
|
||||
process.electronBinding = electronBindingSetup(process._linkedBinding, process.type)
|
||||
|
||||
type AnyFn = (...args: any[]) => any
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue