aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases/FindUseCase.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/usecases/FindUseCase.js')
-rw-r--r--src/background/usecases/FindUseCase.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/background/usecases/FindUseCase.js b/src/background/usecases/FindUseCase.js
new file mode 100644
index 0000000..224e4a9
--- /dev/null
+++ b/src/background/usecases/FindUseCase.js
@@ -0,0 +1,24 @@
+import FindRepository from '../repositories/FindRepository';
+import TabPresenter from '../presenters/TabPresenter';
+import ConsoleClient from '../infrastructures/ConsoleClient';
+
+export default class FindUseCase {
+ constructor() {
+ this.tabPresenter = new TabPresenter();
+ this.findRepository = new FindRepository();
+ this.consoleClient = new ConsoleClient();
+ }
+
+ getKeyword() {
+ return this.findRepository.getKeyword();
+ }
+
+ setKeyword(keyword) {
+ return this.findRepository.setKeyword(keyword);
+ }
+
+ async findStart() {
+ let tab = await this.tabPresenter.getCurrent();
+ return this.consoleClient.showFind(tab.id);
+ }
+}