mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
* Revert "Remove unnecessary plist keys in desktop_proxy (#10933)" This reverts commit4dbb036df1. * Revert "Fix TestFlight errors caused by desktop_proxy (#10928)" This reverts commit40cb4b5353. * Revert "[PM-5506] Enable electron fuses (#10073)" This reverts commit78c5e9c706. * Revert "[PM-7846] Implement a rust based native messaging proxy and IPC system (#9894)" This reverts commit55874b72bf.
24 lines
616 B
TypeScript
24 lines
616 B
TypeScript
import IPC from "./ipc";
|
|
import NativeMessage from "./nativemessage";
|
|
|
|
// Proxy is a lightweight application which provides bi-directional communication
|
|
// between the browser extension and a running desktop application.
|
|
//
|
|
// Browser extension <-[native messaging]-> proxy <-[ipc]-> desktop
|
|
export class NativeMessagingProxy {
|
|
private ipc: IPC;
|
|
private nativeMessage: NativeMessage;
|
|
|
|
constructor() {
|
|
this.ipc = new IPC();
|
|
this.nativeMessage = new NativeMessage(this.ipc);
|
|
}
|
|
|
|
run() {
|
|
this.ipc.connect();
|
|
this.nativeMessage.listen();
|
|
|
|
this.ipc.onMessage = this.nativeMessage.send;
|
|
}
|
|
}
|