aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases/ReadyFrameUseCase.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/usecases/ReadyFrameUseCase.ts')
-rw-r--r--src/background/usecases/ReadyFrameUseCase.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/background/usecases/ReadyFrameUseCase.ts b/src/background/usecases/ReadyFrameUseCase.ts
new file mode 100644
index 0000000..81bee0c
--- /dev/null
+++ b/src/background/usecases/ReadyFrameUseCase.ts
@@ -0,0 +1,18 @@
+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);
+ }
+}