aboutsummaryrefslogtreecommitdiff
path: root/src/content/controllers/FindController.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-06-14 23:14:51 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-07-05 21:32:43 +0900
commit65cf6f0842d8d5933dc13b3767b1baf398d68cd5 (patch)
treedf9a8b139fd98adb79f075ba655d1303bdf3fd1d /src/content/controllers/FindController.ts
parentcaced372415a944c4297157397d0027ba629fff0 (diff)
Implement FindNextOperator
Diffstat (limited to 'src/content/controllers/FindController.ts')
-rw-r--r--src/content/controllers/FindController.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/content/controllers/FindController.ts b/src/content/controllers/FindController.ts
new file mode 100644
index 0000000..adcdb0d
--- /dev/null
+++ b/src/content/controllers/FindController.ts
@@ -0,0 +1,19 @@
+import { injectable } from "tsyringe";
+import FindUseCase from "../usecases/FindUseCase";
+
+@injectable()
+export default class FindController {
+ constructor(private findUseCase: FindUseCase) {}
+
+ findNext(keyword: string): boolean {
+ return this.findUseCase.findNext(keyword);
+ }
+
+ findPrev(keyword: string): boolean {
+ return this.findUseCase.findPrev(keyword);
+ }
+
+ clearSelection() {
+ return this.findUseCase.clearSelection();
+ }
+}