diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 10:47:00 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-22 10:47:00 +0900 |
commit | b2dcdedad729ff7087867da50e20578f9fc8fb29 (patch) | |
tree | 033ecffbd7db9b6db8000464a68d748fcae1dc3d /src/background/infrastructures | |
parent | 3c7230c3036e8bb2b2e9a752be9b0ef4a0a7349d (diff) | |
parent | 75f86907fc2699c0f0661d4780c38249a18f849b (diff) |
Merge pull request #689 from ueokande/n-times-repeat-operations
Repeat commands n-times
Diffstat (limited to 'src/background/infrastructures')
-rw-r--r-- | src/background/infrastructures/ContentMessageListener.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/background/infrastructures/ContentMessageListener.ts b/src/background/infrastructures/ContentMessageListener.ts index f80d686..f20340b 100644 --- a/src/background/infrastructures/ContentMessageListener.ts +++ b/src/background/infrastructures/ContentMessageListener.ts @@ -1,5 +1,6 @@ import { injectable } from 'tsyringe'; import * as messages from '../../shared/messages'; +import * as operations from '../../shared/operations'; import CompletionGroup from '../domains/CompletionGroup'; import CommandController from '../controllers/CommandController'; import SettingController from '../controllers/SettingController'; @@ -19,7 +20,7 @@ export default class ContentMessageListener { private findController: FindController, private addonEnabledController: AddonEnabledController, private linkController: LinkController, - private backgroundOperationController: OperationController, + private operationController: OperationController, private markController: MarkController, ) { this.consolePorts = {}; @@ -79,7 +80,7 @@ export default class ContentMessageListener { senderTab.id as number, message.background); case messages.BACKGROUND_OPERATION: - return this.onBackgroundOperation(message.operation); + return this.onBackgroundOperation(message.repeat, message.operation); case messages.MARK_SET_GLOBAL: return this.onMarkSetGlobal(message.key, message.x, message.y); case messages.MARK_JUMP_GLOBAL: @@ -126,8 +127,8 @@ export default class ContentMessageListener { return this.linkController.openToTab(url, openerId); } - onBackgroundOperation(operation: any): Promise<any> { - return this.backgroundOperationController.exec(operation); + onBackgroundOperation(count: number, op: operations.Operation): Promise<any> { + return this.operationController.exec(count, op); } onMarkSetGlobal(key: string, x: number, y: number): Promise<any> { |