aboutsummaryrefslogtreecommitdiff
path: root/src/background/infrastructures/content-message-listener.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/infrastructures/content-message-listener.js')
-rw-r--r--src/background/infrastructures/content-message-listener.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/background/infrastructures/content-message-listener.js b/src/background/infrastructures/content-message-listener.js
index 6236f1c..00dba51 100644
--- a/src/background/infrastructures/content-message-listener.js
+++ b/src/background/infrastructures/content-message-listener.js
@@ -1,11 +1,13 @@
import messages from '../../shared/messages';
import CompletionsController from '../controllers/completions';
import SettingController from '../controllers/setting';
+import FindController from '../controllers/find';
export default class ContentMessageListener {
constructor() {
this.settingController = new SettingController();
this.completionsController = new CompletionsController();
+ this.findController = new FindController();
}
run() {
@@ -29,6 +31,10 @@ export default class ContentMessageListener {
return this.onSettingsQuery();
case messages.SETTINGS_RELOAD:
return this.onSettingsReload();
+ case messages.FIND_GET_KEYWORD:
+ return this.onFindGetKeyword();
+ case messages.FIND_SET_KEYWORD:
+ return this.onFindSetKeyword(message.keyword);
}
}
@@ -44,4 +50,12 @@ export default class ContentMessageListener {
onSettingsReload() {
return this.settingController.reload();
}
+
+ onFindGetKeyword() {
+ return this.findController.getKeyword();
+ }
+
+ onFindSetKeyword(keyword) {
+ return this.findController.setKeyword(keyword);
+ }
}