(clipperType: ClientType, clipperData: ClipperData)
| 45 | protected static version = "3.7.7"; |
| 46 | |
| 47 | constructor(clipperType: ClientType, clipperData: ClipperData) { |
| 48 | this.setUnhandledExceptionLogging(); |
| 49 | |
| 50 | this.workers = []; |
| 51 | this.logger = new WorkerPassthroughLogger(this.workers); |
| 52 | ExtensionBase.extensionId = StringUtils.generateGuid(); |
| 53 | |
| 54 | this.clipperData = clipperData; |
| 55 | this.clipperData.setLogger(this.logger); |
| 56 | this.auth = new AuthenticationHelper(this.clipperData, this.logger); |
| 57 | this.tooltip = new TooltipHelper(this.clipperData); |
| 58 | |
| 59 | let clipperFirstRun = false; |
| 60 | |
| 61 | let clipperId = this.clipperData.getValue(ClipperStorageKeys.clipperId); |
| 62 | if (!clipperId) { |
| 63 | // New install |
| 64 | clipperFirstRun = true; |
| 65 | clipperId = ExtensionBase.generateClipperId(); |
| 66 | this.clipperData.setValue(ClipperStorageKeys.clipperId, clipperId); |
| 67 | |
| 68 | // Ensure fresh installs don't trigger thats What's New experience |
| 69 | this.updateLastSeenVersionInStorageToCurrent(); |
| 70 | } |
| 71 | |
| 72 | this.clientInfo = new SmartValue<ClientInfo>({ |
| 73 | clipperType: clipperType, |
| 74 | clipperVersion: ExtensionBase.getExtensionVersion(), |
| 75 | clipperId: clipperId |
| 76 | }); |
| 77 | |
| 78 | if (clipperFirstRun) { |
| 79 | this.onFirstRun(); |
| 80 | } |
| 81 | |
| 82 | this.initializeUserFlighting(); |
| 83 | |
| 84 | this.listenForOpportunityToShowPageNavTooltip(); |
| 85 | } |
| 86 | |
| 87 | protected abstract addPageNavListener(callback: (tab: TTab) => void); |
| 88 | protected abstract checkIfTabIsOnWhitelistedUrl(tab: TTab): boolean; |
nothing calls this directly
no test coverage detected