From a0f2c3ee107508e406a4a41cbda76ecd2d3f0d8f Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 25 Sep 2021 18:17:50 +0900 Subject: Discover frames on search by count of connections When a tab switches pages quickly, a disconnect event on top frame is sometime delivered after second connect event. In addition, `tabs.onUpdated()` event is independent on port connection event. Now the background script finds alive frames by only port connection. --- src/background/usecases/ReadyFrameUseCase.ts | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 src/background/usecases/ReadyFrameUseCase.ts (limited to 'src/background/usecases') diff --git a/src/background/usecases/ReadyFrameUseCase.ts b/src/background/usecases/ReadyFrameUseCase.ts deleted file mode 100644 index 81bee0c..0000000 --- a/src/background/usecases/ReadyFrameUseCase.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { inject, injectable } from "tsyringe"; -import ReadyFrameRepository from "../repositories/ReadyFrameRepository"; - -@injectable() -export default class ReadyFrameUseCase { - constructor( - @inject("ReadyFrameRepository") - private readonly frameRepository: ReadyFrameRepository - ) {} - - async addReadyFrame(tabId: number, frameId: number): Promise { - return this.frameRepository.addFrameId(tabId, frameId); - } - - async clearReadyFrame(tabId: number): Promise { - return this.frameRepository.clearFrameIds(tabId); - } -} -- cgit v1.2.3