1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Initial PoC for browser <-> desktop communication

This commit is contained in:
Hinton
2020-10-05 15:11:37 +02:00
parent 38ecc3b74b
commit f09a788103
13 changed files with 960 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ import { ElectronStorageService } from 'jslib/electron/services/electronStorage.
import { TrayMain } from 'jslib/electron/tray.main';
import { UpdaterMain } from 'jslib/electron/updater.main';
import { WindowMain } from 'jslib/electron/window.main';
import { NativeMessagingService } from './services/nativeMessaging.service';
export class Main {
logService: ElectronLogService;
@@ -33,6 +34,7 @@ export class Main {
powerMonitorMain: PowerMonitorMain;
trayMain: TrayMain;
biometricMain: BiometricMain;
nativeMessagingService: NativeMessagingService;
constructor() {
// Set paths for portable builds
@@ -116,6 +118,8 @@ export class Main {
const BiometricDarwinMain = require('jslib/electron/biometric.darwin.main').default;
this.biometricMain = new BiometricDarwinMain(this.storageService, this.i18nService);
}
this.nativeMessagingService = new NativeMessagingService();
}
bootstrap() {
@@ -153,6 +157,7 @@ export class Main {
// tslint:disable-next-line
console.error(e);
});
this.nativeMessagingService.listen();
}
private processDeepLink(argv: string[]): void {