OLD | NEW |
---|---|
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 Loading... | |
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 // Called when the user accepts the banner to install the app. (Not called | |
dominickn
2017/04/28 03:57:23
Nit: newline above this.
You should also clarify,
Matt Giuca
2017/04/28 03:59:18
My comment already mostly captures this. Worked We
| |
126 // when the "Open" button is pressed on the banner after installation.) | |
125 void SendBannerAccepted(); | 127 void SendBannerAccepted(); |
126 void OnWebApkInstallFinished(WebApkInstallResult result, | 128 void OnWebApkInstallFinished(WebApkInstallResult result, |
127 bool relax_updates, | 129 bool relax_updates, |
128 const std::string& webapk_package_name); | 130 const std::string& webapk_package_name); |
129 | 131 |
130 // Called when a WebAPK install fails. | 132 // Called when a WebAPK install fails. |
131 void OnWebApkInstallFailed(WebApkInstallResult result); | 133 void OnWebApkInstallFailed(WebApkInstallResult result); |
132 | 134 |
133 void TrackWebApkInstallationDismissEvents(InstallState install_state); | 135 void TrackWebApkInstallationDismissEvents(InstallState install_state); |
134 | 136 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 | 173 |
172 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); | 174 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); |
173 }; | 175 }; |
174 | 176 |
175 // Register native methods. | 177 // Register native methods. |
176 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); | 178 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); |
177 | 179 |
178 } // namespace banners | 180 } // namespace banners |
179 | 181 |
180 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ | 182 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ |
OLD | NEW |