| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 const std::string& webapk_package_name); | 129 const std::string& webapk_package_name); |
| 130 |
| 131 // Called when a WebAPK install fails. |
| 132 void OnWebApkInstallFailed(); |
| 133 |
| 130 void TrackWebApkInstallationDismissEvents(InstallState install_state); | 134 void TrackWebApkInstallationDismissEvents(InstallState install_state); |
| 131 | 135 |
| 132 // ConfirmInfoBarDelegate: | 136 // ConfirmInfoBarDelegate: |
| 133 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | 137 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
| 134 gfx::Image GetIcon() const override; | 138 gfx::Image GetIcon() const override; |
| 135 void InfoBarDismissed() override; | 139 void InfoBarDismissed() override; |
| 136 base::string16 GetMessageText() const override; | 140 base::string16 GetMessageText() const override; |
| 137 int GetButtons() const override; | 141 int GetButtons() const override; |
| 138 bool LinkClicked(WindowOpenDisposition disposition) override; | 142 bool LinkClicked(WindowOpenDisposition disposition) override; |
| 139 | 143 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_ |
| OLD | NEW |