aboutsummaryrefslogtreecommitdiff
path: root/src/background/infrastructures
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-21 15:08:07 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-12-21 17:12:15 +0900
commitab58c5edb79b4a5aa347e80deaeb612216a9d34e (patch)
treefd28899de0a1a1558961fef105f9a842376b94cf /src/background/infrastructures
parent493ffc83b01bfbae5f84c66f4db0cc4e1f90a588 (diff)
Add numeric prefix to repeat a command
Diffstat (limited to 'src/background/infrastructures')
-rw-r--r--src/background/infrastructures/ContentMessageListener.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/background/infrastructures/ContentMessageListener.ts b/src/background/infrastructures/ContentMessageListener.ts
index f80d686..51a9f82 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.count, 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> {