diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-03-28 21:35:06 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-03-28 21:43:40 +0900 |
commit | ea63c5f78b4c985e9d6dd106afe4f97bfeedbcd0 (patch) | |
tree | f0accb862f9f3b75c8c86f78361e2acab46f11ef /src/background/controllers/CompletionController.ts | |
parent | a8d78f1286fb3fe456a786b2c0e534d212835560 (diff) |
Complete tabs by the completion packages
Diffstat (limited to 'src/background/controllers/CompletionController.ts')
-rw-r--r-- | src/background/controllers/CompletionController.ts | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/background/controllers/CompletionController.ts b/src/background/controllers/CompletionController.ts index 313f38b..a268d15 100644 --- a/src/background/controllers/CompletionController.ts +++ b/src/background/controllers/CompletionController.ts @@ -1,14 +1,19 @@ import { ConsoleGetCompletionTypesResponse, - ConsoleRequestBookmarksResponse, ConsoleRequestHistoryResponse, ConsoleRequestSearchEnginesResponse + ConsoleRequestBookmarksResponse, + ConsoleRequestHistoryResponse, + ConsoleRequestSearchEnginesResponse, + ConsoleRequesttabsResponse } from "../../shared/messages"; import { injectable } from "tsyringe"; -import CompletionUseCase from "../completion/CompletionUseCase"; +import OpenCompletionUseCase from "../completion/OpenCompletionUseCase"; +import TabCompletionUseCase from "../completion/TabCompletionUseCase"; @injectable() export default class CompletionController { constructor( - private completionUseCase: CompletionUseCase, + private completionUseCase: OpenCompletionUseCase, + private tabCompletionUseCase: TabCompletionUseCase, ) { } @@ -28,4 +33,8 @@ export default class CompletionController { async requestHistory(query: string): Promise<ConsoleRequestHistoryResponse> { return this.completionUseCase.requestHistory(query); } + + async queryTabs(query: string, excludePinned: boolean): Promise<ConsoleRequesttabsResponse> { + return this.tabCompletionUseCase.queryTabs(query, excludePinned); + } }
\ No newline at end of file |