1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-26 13:13:22 +00:00

main messaging service to jslib

This commit is contained in:
Kyle Spearrin
2018-04-26 15:44:07 -04:00
parent 0244a2432c
commit 1f706802f6
4 changed files with 8 additions and 20 deletions

View File

@@ -1,15 +0,0 @@
import { MessagingService } from 'jslib/abstractions/messaging.service';
import { Main } from '../main';
export class DesktopMainMessagingService implements MessagingService {
constructor(private main: Main) { }
send(subscriber: string, arg: any = {}) {
const message = Object.assign({}, { command: subscriber }, arg);
this.main.messagingMain.onMessage(message);
if (this.main.windowMain.win != null) {
this.main.windowMain.win.webContents.send('messagingService', message);
}
}
}