diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-07-29 22:29:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 22:29:40 +0900 |
commit | 5592b02a1500062628063862158116f382f3d8e2 (patch) | |
tree | 5c29d29a8fa1aa14f4f6407a66bcaf528c42555c /src/content/controllers | |
parent | 75236e9a41788f64df61b14a99e78aedc548e0ad (diff) | |
parent | 1160cf8aedf9810a76d84e3d99a72365e8aeae8a (diff) |
Merge pull request #1213 from ueokande/cross-frame-search
Cross frame search
Diffstat (limited to 'src/content/controllers')
-rw-r--r-- | src/content/controllers/FindController.ts | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/content/controllers/FindController.ts b/src/content/controllers/FindController.ts index 3087d5d..adcdb0d 100644 --- a/src/content/controllers/FindController.ts +++ b/src/content/controllers/FindController.ts @@ -1,20 +1,19 @@ import { injectable } from "tsyringe"; -import * as messages from "../../shared/messages"; import FindUseCase from "../usecases/FindUseCase"; @injectable() export default class FindController { constructor(private findUseCase: FindUseCase) {} - async start(m: messages.ConsoleEnterFindMessage): Promise<void> { - await this.findUseCase.startFind(m.text); + findNext(keyword: string): boolean { + return this.findUseCase.findNext(keyword); } - async next(_: messages.FindNextMessage): Promise<void> { - await this.findUseCase.findNext(); + findPrev(keyword: string): boolean { + return this.findUseCase.findPrev(keyword); } - async prev(_: messages.FindPrevMessage): Promise<void> { - await this.findUseCase.findPrev(); + clearSelection() { + return this.findUseCase.clearSelection(); } } |