mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Move raw ipc calls into the applicationDelegate
This commit is contained in:
@@ -235,3 +235,12 @@ class ApplicationDelegate
|
||||
|
||||
disablePinchToZoom: ->
|
||||
webFrame.setZoomLevelLimits(1, 1)
|
||||
|
||||
checkForUpdate: ->
|
||||
ipcRenderer.send('check-for-update')
|
||||
|
||||
restartAndInstallUpdate: ->
|
||||
ipcRenderer.send('install-update')
|
||||
|
||||
getAutoUpdateManagerState: ->
|
||||
ipcRenderer.sendSync('get-auto-update-manager-state')
|
||||
|
||||
@@ -5,6 +5,7 @@ import {ipcRenderer} from 'electron'
|
||||
|
||||
export default class AutoUpdateManager {
|
||||
constructor ({applicationDelegate}) {
|
||||
this.applicationDelegate = applicationDelegate
|
||||
this.subscriptions = new CompositeDisposable()
|
||||
this.emitter = new Emitter()
|
||||
|
||||
@@ -30,15 +31,15 @@ export default class AutoUpdateManager {
|
||||
}
|
||||
|
||||
checkForUpdate () {
|
||||
ipcRenderer.send('check-for-update')
|
||||
this.applicationDelegate.checkForUpdate()
|
||||
}
|
||||
|
||||
restartAndInstallUpdate () {
|
||||
ipcRenderer.send('install-update')
|
||||
this.applicationDelegate.restartAndInstallUpdate()
|
||||
}
|
||||
|
||||
getState () {
|
||||
return ipcRenderer.sendSync('get-auto-update-manager-state')
|
||||
return this.applicationDelegate.getAutoUpdateManagerState()
|
||||
}
|
||||
|
||||
platformSupportsUpdates () {
|
||||
|
||||
Reference in New Issue
Block a user