aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases/link.js
blob: b8ed71954598ed5fcdf251339058fffb2c2203a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import SettingRepository from '../repositories/setting';
import TabPresenter from '../presenters/tab';

export default class LinkInteractor {
  constructor() {
    this.settingRepository = new SettingRepository();
    this.tabPresenter = new TabPresenter();
  }

  openToTab(url, tabId) {
    return this.tabPresenter.open(url, tabId);
  }

  openNewTab(url, openerId, background) {
    return this.tabPresenter.create(url, {
      openerTabId: openerId, active: !background
    });
  }
}