1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

defining more abstractions

This commit is contained in:
Kyle Spearrin
2018-01-25 14:26:09 -05:00
parent e5c1adedff
commit 11755e409a
9 changed files with 111 additions and 45 deletions

View File

@@ -1,15 +1,18 @@
import { DeviceType } from '../enums/deviceType';
export interface PlatformUtilsService {
getDevice(): DeviceType;
getDeviceString(): string;
isFirefox(): boolean;
isChrome(): boolean;
isEdge(): boolean;
isOpera(): boolean;
isVivaldi(): boolean;
isSafari(): boolean;
analyticsId(): string;
getDomain(uriString: string): string;
isViewOpen(): boolean;
export abstract class PlatformUtilsService {
getDevice: () => DeviceType;
getDeviceString: () => string;
isFirefox: () => boolean;
isChrome: () => boolean;
isEdge: () => boolean;
isOpera: () => boolean;
isVivaldi: () => boolean;
isSafari: () => boolean;
analyticsId: () => string;
getDomain: (uriString: string) => string;
isViewOpen: () => boolean;
launchUri: (uri: string) => void;
saveFile: (win: Window, blobData: any, blobOptions: any, fileName: string) => void;
alertError: (title: string, message: string) => void;
}