Repeat last operation

This commit is contained in:
Shin'ya Ueoka 2019-05-25 21:33:33 +09:00
parent 03370301a7
commit ccbe08cf66
7 changed files with 110 additions and 7 deletions

View file

@ -1,9 +1,11 @@
import { injectable } from 'tsyringe';
import * as operations from '../../shared/operations';
import * as messages from '../../shared/messages';
@injectable()
export default class BackgroundClient {
export default interface OperationClient {
execBackgroundOp(op: operations.Operation): Promise<void>;
}
export class OperationClientImpl implements OperationClient {
execBackgroundOp(op: operations.Operation): Promise<void> {
return browser.runtime.sendMessage({
type: messages.BACKGROUND_OPERATION,