aboutsummaryrefslogtreecommitdiff
path: root/src/background/controllers/SettingController.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/controllers/SettingController.js')
-rw-r--r--src/background/controllers/SettingController.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/background/controllers/SettingController.js b/src/background/controllers/SettingController.js
new file mode 100644
index 0000000..e895d72
--- /dev/null
+++ b/src/background/controllers/SettingController.js
@@ -0,0 +1,18 @@
+import SettingUseCase from '../usecases/SettingUseCase';
+import ContentMessageClient from '../infrastructures/ContentMessageClient';
+
+export default class SettingController {
+ constructor() {
+ this.settingUseCase = new SettingUseCase();
+ this.contentMessageClient = new ContentMessageClient();
+ }
+
+ getSetting() {
+ return this.settingUseCase.get();
+ }
+
+ async reload() {
+ await this.settingUseCase.reload();
+ this.contentMessageClient.broadcastSettingsChanged();
+ }
+}