| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // Called when the OK button on a WebAPK infobar is pressed. If the WebAPK is | 119 // Called when the OK button on a WebAPK infobar is pressed. If the WebAPK is |
| 120 // already installed, opens it; otherwise, installs it. Returns whether the | 120 // already installed, opens it; otherwise, installs it. Returns whether the |
| 121 // infobar should be closed as a result of the button press. | 121 // infobar should be closed as a result of the button press. |
| 122 bool AcceptWebApk(content::WebContents* web_contents); | 122 bool AcceptWebApk(content::WebContents* web_contents); |
| 123 | 123 |
| 124 // Returns false if this delegate is for a WebAPK and was triggered from the | 124 // Returns false if this delegate is for a WebAPK and was triggered from the |
| 125 // A2HS menu item. Otherwise returns true. | 125 // A2HS menu item. Otherwise returns true. |
| 126 bool TriggeredFromBanner() const; | 126 bool TriggeredFromBanner() const; |
| 127 void SendBannerAccepted(); | 127 void SendBannerAccepted(); |
| 128 void OnWebApkInstallFinished(bool success, | 128 void OnWebApkInstallFinished(bool success, |
| 129 bool relax_updates, |
| 129 const std::string& webapk_package_name); | 130 const std::string& webapk_package_name); |
| 130 | 131 |
| 131 // Called when a WebAPK install fails. | 132 // Called when a WebAPK install fails. |
| 132 void OnWebApkInstallFailed(); | 133 void OnWebApkInstallFailed(); |
| 133 | 134 |
| 134 void TrackWebApkInstallationDismissEvents(InstallState install_state); | 135 void TrackWebApkInstallationDismissEvents(InstallState install_state); |
| 135 | 136 |
| 136 // ConfirmInfoBarDelegate: | 137 // ConfirmInfoBarDelegate: |
| 137 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | 138 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
| 138 gfx::Image GetIcon() const override; | 139 gfx::Image GetIcon() const override; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 176 |
| 176 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); | 177 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); |
| 177 }; | 178 }; |
| 178 | 179 |
| 179 // Register native methods. | 180 // Register native methods. |
| 180 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); | 181 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); |
| 181 | 182 |
| 182 } // namespace banners | 183 } // namespace banners |
| 183 | 184 |
| 184 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ | 185 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ |
| OLD | NEW |