Merge pull request #13050 from electron/3.0.0-deprecations

chore: removal of 3.0.0 deprecations
This commit is contained in:
Charles Kerr 2018-05-30 09:25:36 +02:00 committed by GitHub
commit b89fe86fa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 76 additions and 421 deletions

View file

@ -2,41 +2,8 @@ if (process.platform === 'linux' && process.type === 'renderer') {
// On Linux we could not access clipboard in renderer process.
module.exports = require('electron').remote.clipboard
} else {
const {deprecate} = require('electron')
const clipboard = process.atomBinding('clipboard')
// TODO(codebytere): remove in 3.0
clipboard.readHtml = function () {
if (!process.noDeprecations) {
deprecate.warn('clipboard.readHtml', 'clipboard.readHTML')
}
return clipboard.readHTML()
}
// TODO(codebytere): remove in 3.0
clipboard.writeHtml = function () {
if (!process.noDeprecations) {
deprecate.warn('clipboard.writeHtml', 'clipboard.writeHTML')
}
return clipboard.writeHTML()
}
// TODO(codebytere): remove in 3.0
clipboard.readRtf = function () {
if (!process.noDeprecations) {
deprecate.warn('clipboard.readRtf', 'clipboard.writeRTF')
}
return clipboard.readRTF()
}
// TODO(codebytere): remove in 3.0
clipboard.writeRtf = function () {
if (!process.noDeprecations) {
deprecate.warn('clipboard.writeRtf', 'clipboard.writeRTF')
}
return clipboard.writeRTF()
}
// Read/write to find pasteboard over IPC since only main process is notified
// of changes
if (process.platform === 'darwin' && process.type === 'renderer') {

View file

@ -4,7 +4,7 @@ const {spawn} = require('child_process')
const os = require('os')
const path = require('path')
const electron = require('electron')
const {app, deprecate} = process.type === 'browser' ? electron : electron.remote
const {app} = process.type === 'browser' ? electron : electron.remote
const binding = process.atomBinding('crash_reporter')
class CrashReporter {
@ -21,12 +21,7 @@ class CrashReporter {
} = options
if (uploadToServer == null) {
if (options.autoSubmit) {
deprecate.warn('autoSubmit', 'uploadToServer')
uploadToServer = options.autoSubmit
} else {
uploadToServer = true
}
uploadToServer = true
}
if (ignoreSystemCrashHandler == null) ignoreSystemCrashHandler = false