diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-03-22 20:44:07 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 20:44:07 +0900 |
commit | fa733c1ff110054f673f3d4e8d4760eb90d5d1eb (patch) | |
tree | 0a7d9f041a01d29f0bc5972a343e4988dc71b468 /src/content/operators/impls/AddonOperatorFactoryChain.ts | |
parent | 3cbaf4a9f4245bd6be4eccdbff11e20ffaaf523a (diff) | |
parent | 690c9c080a2a511a30d555a90e5005e06b750351 (diff) |
Merge pull request #1043 from ueokande/iframe-late-inject
iframe Late injection
Diffstat (limited to 'src/content/operators/impls/AddonOperatorFactoryChain.ts')
-rw-r--r-- | src/content/operators/impls/AddonOperatorFactoryChain.ts | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/content/operators/impls/AddonOperatorFactoryChain.ts b/src/content/operators/impls/AddonOperatorFactoryChain.ts index 54880c4..5e464e8 100644 --- a/src/content/operators/impls/AddonOperatorFactoryChain.ts +++ b/src/content/operators/impls/AddonOperatorFactoryChain.ts @@ -7,6 +7,7 @@ import Operator from "../Operator"; import EnableAddonOperator from "./EnableAddonOperator"; import DisableAddonOperator from "./DisableAddonOperator"; import ToggleAddonOperator from "./ToggleAddonOperator"; +import ConsoleFramePresenter from "../../presenters/ConsoleFramePresenter"; @injectable() export default class AddonOperatorFactoryChain implements OperatorFactoryChain { @@ -14,7 +15,9 @@ export default class AddonOperatorFactoryChain implements OperatorFactoryChain { @inject("AddonIndicatorClient") private readonly addonIndicatorClient: AddonIndicatorClient, @inject("AddonEnabledRepository") - private readonly addonEnabledRepository: AddonEnabledRepository + private readonly addonEnabledRepository: AddonEnabledRepository, + @inject("ConsoleFramePresenter") + private readonly consoleFramePresenter: ConsoleFramePresenter ) {} create(op: operations.Operation, _repeat: number): Operator | null { @@ -22,17 +25,20 @@ export default class AddonOperatorFactoryChain implements OperatorFactoryChain { case operations.ADDON_ENABLE: return new EnableAddonOperator( this.addonIndicatorClient, - this.addonEnabledRepository + this.addonEnabledRepository, + this.consoleFramePresenter ); case operations.ADDON_DISABLE: return new DisableAddonOperator( this.addonIndicatorClient, - this.addonEnabledRepository + this.addonEnabledRepository, + this.consoleFramePresenter ); case operations.ADDON_TOGGLE_ENABLED: return new ToggleAddonOperator( this.addonIndicatorClient, - this.addonEnabledRepository + this.addonEnabledRepository, + this.consoleFramePresenter ); } return null; |