diff --git a/atom/browser/api/lib/ipc-main.coffee b/atom/browser/api/lib/ipc-main.coffee new file mode 100644 index 000000000000..8021544479d2 --- /dev/null +++ b/atom/browser/api/lib/ipc-main.coffee @@ -0,0 +1,3 @@ +{EventEmitter} = require 'events' + +module.exports = new EventEmitter diff --git a/atom/browser/api/lib/ipc.coffee b/atom/browser/api/lib/ipc.coffee index 71cf1d17e491..f116b9a874a5 100644 --- a/atom/browser/api/lib/ipc.coffee +++ b/atom/browser/api/lib/ipc.coffee @@ -1,3 +1,6 @@ -EventEmitter = require('events').EventEmitter +deprecate = require 'deprecate' -module.exports = new EventEmitter +# This module is deprecated, we mirror everything from ipcRenderer. +deprecate.warn 'ipc module', 'ipcMain module' + +module.exports = require 'ipc-main' diff --git a/filenames.gypi b/filenames.gypi index 93cb4f3e07aa..4dc709c5ec57 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -18,6 +18,7 @@ 'atom/browser/api/lib/dialog.coffee', 'atom/browser/api/lib/global-shortcut.coffee', 'atom/browser/api/lib/ipc.coffee', + 'atom/browser/api/lib/ipc-main.coffee', 'atom/browser/api/lib/menu.coffee', 'atom/browser/api/lib/menu-item.coffee', 'atom/browser/api/lib/navigation-controller.coffee',