aboutsummaryrefslogtreecommitdiff
path: root/src/background/controllers/CompletionController.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/controllers/CompletionController.ts')
-rw-r--r--src/background/controllers/CompletionController.ts15
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