Make AppBannerInfoBar install WebAPK.
On UI, the text for installing a WebAPK in the App Banner is: 1) "Add to Homescreen" -> "Adding" -> "Open" for a sucessful installation 2) "Add to Homescreen" -> "Adding" -> "Unable to save" toast for an unsucessful installation. WebAPK-specific logic is added to AppBannerInfobarDelegateAndroid to show the above text. Besides, checking whether a site is WebAPK Compattive is based on 1) installable check + 2) url is over "https" + 3) WebAPK is enabled on command line. Currently, WebAPK is installed as an untrusted source with Android installation dialog pops up. User could choose cancel the installation even after the WebAPK has been downloaded locally. To detect the cancel behavior, AppBannerInfobarDelegateAndroid checks whether the WebAPK has been installed or not after Chrome is resumed. This isn't an ideal way, but it seems we can't find a better way to detect the cancel event. This logic will be removed when WebAPK is installed by Play soon. This CL disables creating WebAPKs by selecting add-to-homescreen from the app menu. Instead, in a follow up CL, selecting from the app menu will make the app banner info bar shown to install WebAPKs. BUG=627250 Review-Url: https://codereview.chromium.org/2259553002 Cr-Commit-Position: refs/heads/master@{#415365}
Showing
Please register or sign in to comment