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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user