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

Side by Side Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.h

Issue 2848703005: Fix appinstalled event firing when user opens a WebAPK from banner. (Closed)
Patch Set: Better comment. Created 3 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_infobar_delegate_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bool AcceptWebApp(content::WebContents* web_contents); 115 bool AcceptWebApp(content::WebContents* web_contents);
116 116
117 // Called when the OK button on a WebAPK infobar is pressed. If the WebAPK is 117 // Called when the OK button on a WebAPK infobar is pressed. If the WebAPK is
118 // already installed, opens it; otherwise, installs it. Returns whether the 118 // already installed, opens it; otherwise, installs it. Returns whether the
119 // infobar should be closed as a result of the button press. 119 // infobar should be closed as a result of the button press.
120 bool AcceptWebApk(content::WebContents* web_contents); 120 bool AcceptWebApk(content::WebContents* web_contents);
121 121
122 // Returns false if this delegate is for a WebAPK and was triggered from the 122 // Returns false if this delegate is for a WebAPK and was triggered from the
123 // A2HS menu item. Otherwise returns true. 123 // A2HS menu item. Otherwise returns true.
124 bool TriggeredFromBanner() const; 124 bool TriggeredFromBanner() const;
125
126 // Called when the user accepts the banner to install the app. (Not called
127 // when the "Open" button is pressed on the banner that is shown after
128 // installation for WebAPK banners.)
125 void SendBannerAccepted(); 129 void SendBannerAccepted();
126 void OnWebApkInstallFinished(WebApkInstallResult result, 130 void OnWebApkInstallFinished(WebApkInstallResult result,
127 bool relax_updates, 131 bool relax_updates,
128 const std::string& webapk_package_name); 132 const std::string& webapk_package_name);
129 133
130 // Called when a WebAPK install fails. 134 // Called when a WebAPK install fails.
131 void OnWebApkInstallFailed(WebApkInstallResult result); 135 void OnWebApkInstallFailed(WebApkInstallResult result);
132 136
133 void TrackWebApkInstallationDismissEvents(InstallState install_state); 137 void TrackWebApkInstallationDismissEvents(InstallState install_state);
134 138
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 175
172 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); 176 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid);
173 }; 177 };
174 178
175 // Register native methods. 179 // Register native methods.
176 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); 180 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env);
177 181
178 } // namespace banners 182 } // namespace banners
179 183
180 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 184 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_infobar_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698