diff --git a/apps/browser/src/autofill/background/overlay.background.spec.ts b/apps/browser/src/autofill/background/overlay.background.spec.ts index 56a6c82a5cf..740c3828b20 100644 --- a/apps/browser/src/autofill/background/overlay.background.spec.ts +++ b/apps/browser/src/autofill/background/overlay.background.spec.ts @@ -418,7 +418,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).not.toHaveBeenCalledWith( sender.tab, { - command: "appendInlineMenuElementsToDom", + command: "appendAutofillInlineMenuToDom", overlayElement: AutofillOverlayElement.Button, }, { frameId: 0 }, @@ -426,7 +426,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).not.toHaveBeenCalledWith( sender.tab, { - command: "appendInlineMenuElementsToDom", + command: "appendAutofillInlineMenuToDom", overlayElement: AutofillOverlayElement.List, }, { frameId: 0 }, @@ -440,7 +440,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, { - command: "appendInlineMenuElementsToDom", + command: "appendAutofillInlineMenuToDom", overlayElement: AutofillOverlayElement.Button, }, { frameId: 0 }, @@ -448,7 +448,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, { - command: "appendInlineMenuElementsToDom", + command: "appendAutofillInlineMenuToDom", overlayElement: AutofillOverlayElement.List, }, { frameId: 0 }, @@ -470,7 +470,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, { - command: "appendInlineMenuElementsToDom", + command: "appendAutofillInlineMenuToDom", overlayElement: AutofillOverlayElement.Button, }, { frameId: 0 }, @@ -478,7 +478,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).not.toHaveBeenCalledWith( sender.tab, { - command: "appendInlineMenuElementsToDom", + command: "appendAutofillInlineMenuToDom", overlayElement: AutofillOverlayElement.List, }, { frameId: 0 }, @@ -882,7 +882,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, { - command: "closeInlineMenu", + command: "closeAutofillInlineMenu", overlayElement: AutofillOverlayElement.Button, }, { frameId: 0 }, @@ -922,7 +922,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, { - command: "closeInlineMenu", + command: "closeAutofillInlineMenu", overlayElement: AutofillOverlayElement.List, }, { frameId: 0 }, @@ -930,7 +930,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).not.toHaveBeenCalledWith( sender.tab, { - command: "closeInlineMenu", + command: "closeAutofillInlineMenu", overlayElement: AutofillOverlayElement.Button, }, { frameId: 0 }, @@ -944,7 +944,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, { - command: "closeInlineMenu", + command: "closeAutofillInlineMenu", overlayElement: undefined, }, { frameId: 0 }, @@ -1188,7 +1188,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, - { command: "checkIsInlineMenuButtonVisible" }, + { command: "checkIsAutofillInlineMenuButtonVisible" }, { frameId: 0 }, ); }); @@ -1202,7 +1202,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, - { command: "checkIsInlineMenuListVisible" }, + { command: "checkIsAutofillInlineMenuListVisible" }, { frameId: 0 }, ); }); @@ -1449,7 +1449,7 @@ describe("OverlayBackground", () => { expect(tabsSendMessageSpy).toHaveBeenCalledWith( sender.tab, - { command: "closeInlineMenu", overlayElement: undefined }, + { command: "closeAutofillInlineMenu", overlayElement: undefined }, { frameId: 0 }, ); expect(tabSendMessageDataSpy).toBeCalledWith( diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index 2a668734859..4921d6b8883 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -483,7 +483,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { sender: chrome.runtime.MessageSender, { forceCloseAutofillInlineMenu, overlayElement }: CloseInlineMenuMessage = {}, ) { - const command = "closeInlineMenu"; + const command = "closeAutofillInlineMenu"; const sendOptions = { frameId: 0 }; if (forceCloseAutofillInlineMenu) { void BrowserApi.tabSendMessage(sender.tab, { command, overlayElement }, sendOptions); @@ -568,7 +568,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { await BrowserApi.tabSendMessage( sender.tab, - { command: "appendInlineMenuElementsToDom", overlayElement }, + { command: "appendAutofillInlineMenuToDom", overlayElement }, { frameId: 0 }, ); @@ -703,7 +703,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { void BrowserApi.tabSendMessage( sender.tab, - { command: "toggleInlineMenuHidden", isInlineMenuHidden: isAutofillInlineMenuHidden }, + { command: "toggleAutofillInlineMenuHidden", isInlineMenuHidden: isAutofillInlineMenuHidden }, { frameId: 0 }, ); @@ -988,7 +988,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { ): Promise { return await BrowserApi.tabSendMessage( sender.tab, - { command: "checkIsInlineMenuButtonVisible" }, + { command: "checkIsAutofillInlineMenuButtonVisible" }, { frameId: 0 }, ); } @@ -1003,7 +1003,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { ): Promise { return await BrowserApi.tabSendMessage( sender.tab, - { command: "checkIsInlineMenuListVisible" }, + { command: "checkIsAutofillInlineMenuListVisible" }, { frameId: 0 }, ); } diff --git a/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-inline-menu-content.service.ts b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-inline-menu-content.service.ts index c4a9b74301c..d6579dfe1aa 100644 --- a/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-inline-menu-content.service.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-inline-menu-content.service.ts @@ -2,11 +2,11 @@ import { AutofillExtensionMessageParam } from "../../../content/abstractions/aut export type InlineMenuExtensionMessageHandlers = { [key: string]: CallableFunction; - closeInlineMenu: ({ message }: AutofillExtensionMessageParam) => void; - appendInlineMenuElementsToDom: ({ message }: AutofillExtensionMessageParam) => Promise; - toggleInlineMenuHidden: ({ message }: AutofillExtensionMessageParam) => void; - checkIsInlineMenuButtonVisible: () => boolean; - checkIsInlineMenuListVisible: () => boolean; + closeAutofillInlineMenu: ({ message }: AutofillExtensionMessageParam) => void; + appendAutofillInlineMenuToDom: ({ message }: AutofillExtensionMessageParam) => Promise; + toggleAutofillInlineMenuHidden: ({ message }: AutofillExtensionMessageParam) => void; + checkIsAutofillInlineMenuButtonVisible: () => boolean; + checkIsAutofillInlineMenuListVisible: () => boolean; }; export interface AutofillInlineMenuContentService { diff --git a/apps/browser/src/autofill/overlay/inline-menu/content/autofill-inline-menu-content.service.ts b/apps/browser/src/autofill/overlay/inline-menu/content/autofill-inline-menu-content.service.ts index e66035bf1b3..5106d5ee003 100644 --- a/apps/browser/src/autofill/overlay/inline-menu/content/autofill-inline-menu-content.service.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/content/autofill-inline-menu-content.service.ts @@ -35,12 +35,12 @@ export class AutofillInlineMenuContentService implements AutofillInlineMenuConte zIndex: "2147483647", }; private readonly _extensionMessageHandlers: InlineMenuExtensionMessageHandlers = { - closeInlineMenu: ({ message }) => this.removeInlineMenu(message), - appendInlineMenuElementsToDom: ({ message }) => this.appendInlineMenuElements(message), - toggleInlineMenuHidden: ({ message }) => + closeAutofillInlineMenu: ({ message }) => this.removeInlineMenu(message), + appendAutofillInlineMenuToDom: ({ message }) => this.appendInlineMenuElements(message), + toggleAutofillInlineMenuHidden: ({ message }) => this.toggleInlineMenuHidden(message.isInlineMenuHidden), - checkIsInlineMenuButtonVisible: () => this.isInlineMenuButtonVisible(), - checkIsInlineMenuListVisible: () => this.isInlineMenuListVisible(), + checkIsAutofillInlineMenuButtonVisible: () => this.isInlineMenuButtonVisible(), + checkIsAutofillInlineMenuListVisible: () => this.isInlineMenuListVisible(), }; constructor() {