Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.cc

Issue 2379923002: Implement "appinstalled" event on Android. (Closed)
Patch Set: Rebase. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/android/webapps/add_to_homescreen_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
diff --git a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
index 0007725bafa44a38026c79b5482061aa16482c1f..b9ccb59699fc5c3e8a89f18c1842c1dc349d5327 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
@@ -358,8 +358,13 @@ bool AppBannerInfoBarDelegateAndroid::TriggeredFromBanner() const {
}
void AppBannerInfoBarDelegateAndroid::SendBannerAccepted() {
- if (weak_manager_ && TriggeredFromBanner())
+ if (weak_manager_ && TriggeredFromBanner()) {
weak_manager_->SendBannerAccepted(event_request_id_);
+ // TODO(mgiuca): Send the appinstalled event for WebAPKs (but just removing
+ // this check won't be sufficient).
+ if (!is_webapk_)
+ weak_manager_->OnInstall();
+ }
}
void AppBannerInfoBarDelegateAndroid::OnWebApkInstallFinished(
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/android/webapps/add_to_homescreen_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698