MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / constructor

Method constructor

src/controller/decrypt.controller.js:23–46  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

21
22export default class DecryptController extends SubController {
23 constructor(port) {
24 super(port);
25 if (!port) {
26 this.mainType = 'decryptCont';
27 this.id = getUUID();
28 }
29 this.state = {
30 popupId: null,
31 popupOpenerTabId: null
32 };
33 this.armored = null;
34 this.message = null;
35 this.sender = null;
36 this.popup = null;
37 this.decryptReady = null;
38 this.reconnect = false;
39 // register event handlers
40 this.on('decrypt-dialog-cancel', this.dialogCancel);
41 this.on('decrypt-message-init', this.onDecryptMessageInit);
42 this.on('decrypt-message', this.onDecrypt);
43 this.on('dframe-display-popup', this.onDframeDisplayPopup);
44 this.on('set-armored', this.onSetArmored);
45 this.on('decrypt-inline-user-input', msg => uiLog.push(msg.source, msg.type));
46 }
47
48 async onDecryptMessageInit({reconnect}) {
49 this.reconnect = reconnect;

Callers

nothing calls this directly

Calls 3

getUUIDFunction · 0.90
onMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected