aboutsummaryrefslogtreecommitdiff
path: root/src/background/clients/NavigateClient.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-12-02 22:40:10 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2020-12-09 23:09:34 +0900
commitca804b1b335df0e7a316d12ed9246beec55ff7f2 (patch)
tree6265d1d0b4e7637a10ae9e68e0f2949d11fcd0e4 /src/background/clients/NavigateClient.ts
parentddf912804fc4cb26d388283eacca63a0aeddf779 (diff)
Make background operator as an operator
Diffstat (limited to 'src/background/clients/NavigateClient.ts')
-rw-r--r--src/background/clients/NavigateClient.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/background/clients/NavigateClient.ts b/src/background/clients/NavigateClient.ts
index 40ceb45..af8688e 100644
--- a/src/background/clients/NavigateClient.ts
+++ b/src/background/clients/NavigateClient.ts
@@ -1,8 +1,16 @@
-import { injectable } from "tsyringe";
import * as messages from "../../shared/messages";
-@injectable()
-export default class NavigateClient {
+export default interface NavigateClient {
+ historyNext(tabId: number): Promise<void>;
+
+ historyPrev(tabId: number): Promise<void>;
+
+ linkNext(tabId: number): Promise<void>;
+
+ linkPrev(tabId: number): Promise<void>;
+}
+
+export class NavigateClientImpl implements NavigateClient {
async historyNext(tabId: number): Promise<void> {
await browser.tabs.sendMessage(tabId, {
type: messages.NAVIGATE_HISTORY_NEXT,