aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-09-25 18:17:50 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-09-25 18:57:07 +0900
commita0f2c3ee107508e406a4a41cbda76ecd2d3f0d8f (patch)
tree2a14c2b99fa32e3a7c7473adaa60c8f544a9a56d /src/background/usecases
parentfa3500e3bbd11caa0e7ad1633b85f95600cf962f (diff)
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.
Diffstat (limited to 'src/background/usecases')
-rw-r--r--src/background/usecases/ReadyFrameUseCase.ts18
1 files changed, 0 insertions, 18 deletions
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<void> {
- return this.frameRepository.addFrameId(tabId, frameId);
- }
-
- async clearReadyFrame(tabId: number): Promise<void> {
- return this.frameRepository.clearFrameIds(tabId);
- }
-}