Handle different app type creation.
There were two existing issues with opening app: - ARC app: When an Arc app is opened, the instance state is Started & Running & Visible. When the Arc app is closed, there are a sequence of Destroy-Started & Running-Destroy state sent. The second Stated & Running doesn't show the window but could consume on of the campaign impression. - Browser and PWA: When navigating to an url, there might be an instant creation event sent with PWA id. This could lead to showing campaign on wrong window or unexpected consumption of campaign impression. This cl addresses the two issue above by appropriately handling different app types (Browser/PWA/ARC): - ARC app: triggers campaign when app is created and visible. - PWA app: triggers campaign when app is created, check if the browser is off web app type. - Browser: triggers campaign when primary page changed. - SWA and other app type: triggers campaign when app is created. Bug: b/342489221, b/342489300 Change-Id: I579131d10705580c4ab6612778986405c9af39fa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5586042 Reviewed-by:Li Lin <llin@chromium.org> Commit-Queue: Thu Huong Vu <thv@chromium.org> Reviewed-by:
Jimmy Gong <jimmyxgong@chromium.org> Reviewed-by:
Tao Wu <wutao@chromium.org> Cr-Commit-Position: refs/heads/main@{#1312239}
Loading