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