Add makeSingleInstance() API to 'app' module

Electron 0.34.1 introduced a new API `makeSingleInstance()`.

https://github.com/atom/electron/blob/master/docs/api/app.md#appmakesingleinstancecallback
This commit is contained in:
rhysd
2015-10-31 17:25:18 +09:00
parent eb59a40d3c
commit 9bd639eaf8
2 changed files with 21 additions and 0 deletions
+6
View File
@@ -986,6 +986,12 @@ declare module GitHubElectron {
setUserTasks(tasks: Task[]): void;
dock: BrowserWindow;
commandLine: CommandLine;
/**
* This method makes your application a Single Instance Application instead of allowing
* multiple instances of your app to run, this will ensure that only a single instance
* of your app is running, and other instances signal this instance and exit.
*/
makeSingleInstance(callback: (args: string[], workingDirectory: string) => boolean): boolean;
}
interface CommandLine {