* @param {!./deps.DepsDef} deps * @param {!./fetcher.Fetcher} fetcher
(deps, fetcher)
| 7738 | * @param {!./fetcher.Fetcher} fetcher |
| 7739 | */ |
| 7740 | constructor(deps, fetcher) { |
| 7741 | /** @private @const {!./fetcher.Fetcher} */ |
| 7742 | this.fetcher_ = fetcher; |
| 7743 | |
| 7744 | /** @private @const {!../model/doc.Doc} */ |
| 7745 | this.doc_ = deps.doc(); |
| 7746 | |
| 7747 | /** @private @const {!./deps.DepsDef} */ |
| 7748 | this.deps_ = deps; |
| 7749 | |
| 7750 | /** @private @const {!../components/activities.ActivityPorts} */ |
| 7751 | this.activityPorts_ = deps.activities(); |
| 7752 | |
| 7753 | /** @private @const {!HTMLIFrameElement} */ |
| 7754 | this.iframe_ = /** @type {!HTMLIFrameElement} */ ( |
| 7755 | createElement(this.doc_.getWin().document, 'iframe', {}) |
| 7756 | ); |
| 7757 | setImportantStyles$1(this.iframe_, iframeStyles); |
| 7758 | this.doc_.getBody().appendChild(this.getElement()); |
| 7759 | |
| 7760 | /** @private @type {!boolean} */ |
| 7761 | this.everFinishedLog_ = false; |
| 7762 | |
| 7763 | /** |
| 7764 | * @private @const {!AnalyticsContext} |
| 7765 | */ |
| 7766 | this.context_ = new AnalyticsContext(); |
| 7767 | this.setStaticContext_(); |
| 7768 | |
| 7769 | /** @private {?Promise<!web-activities/activity-ports.ActivityIframePort>} */ |
| 7770 | this.serviceReady_ = null; |
| 7771 | |
| 7772 | /** @private {?Promise} */ |
| 7773 | this.lastAction_ = null; |
| 7774 | |
| 7775 | /** @private @const {!ClientEventManager} */ |
| 7776 | this.eventManager_ = deps.eventManager(); |
| 7777 | this.eventManager_.registerEventListener( |
| 7778 | this.handleClientEvent_.bind(this) |
| 7779 | ); |
| 7780 | |
| 7781 | // This code creates a 'promise to log' that we can use to ensure all |
| 7782 | // logging is finished prior to redirecting the page. |
| 7783 | /** @private {!number} */ |
| 7784 | this.unfinishedLogs_ = 0; |
| 7785 | |
| 7786 | /** @private {?function(boolean)} */ |
| 7787 | this.loggingResolver_ = null; |
| 7788 | |
| 7789 | /** @private {?Promise} */ |
| 7790 | this.promiseToLog_ = null; |
| 7791 | |
| 7792 | // If logging doesn't work don't force the user to wait |
| 7793 | /** @private {!boolean} */ |
| 7794 | this.loggingBroken_ = false; |
| 7795 | |
| 7796 | // If logging exceeds the timeouts (see const comments above) don't make |
| 7797 | // the user wait too long. |
nothing calls this directly
no test coverage detected