diff options
Diffstat (limited to 'src/content/controllers/NavigateController.ts')
-rw-r--r-- | src/content/controllers/NavigateController.ts | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/content/controllers/NavigateController.ts b/src/content/controllers/NavigateController.ts new file mode 100644 index 0000000..3f2df7a --- /dev/null +++ b/src/content/controllers/NavigateController.ts @@ -0,0 +1,31 @@ +import { injectable } from 'tsyringe'; +import { Message } from '../../shared/messages'; +import NavigateUseCase from '../usecases/NavigateUseCase'; + +@injectable() +export default class NavigateController { + constructor( + private navigateUseCase: NavigateUseCase, + ) { + } + + openHistoryNext(_m: Message): Promise<void> { + this.navigateUseCase.openHistoryNext(); + return Promise.resolve(); + } + + openHistoryPrev(_m: Message): Promise<void> { + this.navigateUseCase.openHistoryPrev(); + return Promise.resolve(); + } + + openLinkNext(_m: Message): Promise<void> { + this.navigateUseCase.openLinkNext(); + return Promise.resolve(); + } + + openLinkPrev(_m: Message): Promise<void> { + this.navigateUseCase.openLinkPrev(); + return Promise.resolve(); + } +} |