Chromium Code Reviews| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 | 114 |
| 115 // Called when the OK button on a WebAPK infobar is pressed. If the WebAPK is | 115 // Called when the OK button on a WebAPK infobar is pressed. If the WebAPK is |
| 116 // already installed, opens it; otherwise, installs it. Returns whether the | 116 // already installed, opens it; otherwise, installs it. Returns whether the |
| 117 // infobar should be closed as a result of the button press. | 117 // infobar should be closed as a result of the button press. |
| 118 bool AcceptWebApk(content::WebContents* web_contents); | 118 bool AcceptWebApk(content::WebContents* web_contents); |
| 119 | 119 |
| 120 // Returns false if this delegate is for a WebAPK and was triggered from the | 120 // Returns false if this delegate is for a WebAPK and was triggered from the |
| 121 // A2HS menu item. Otherwise returns true. | 121 // A2HS menu item. Otherwise returns true. |
| 122 bool TriggeredFromBanner() const; | 122 bool TriggeredFromBanner() const; |
| 123 void SendBannerAccepted(); | 123 void SendBannerAccepted(); |
| 124 void OnWebApkInstallFinished(bool success, | 124 void OnWebApkInstallFinished(bool success, |
|
dominickn
2017/02/14 04:13:34
An aside: the argument ordering here is a little u
Xi Han
2017/02/14 22:25:47
I move the webapk_package_name to be the last one,
| |
| 125 const std::string& webapk_package_name); | 125 const std::string& webapk_package_name, |
| 126 bool less_updates); | |
|
dominickn
2017/02/14 04:13:34
relax_updates
Xi Han
2017/02/14 22:25:47
Done.
| |
| 126 void TrackWebApkInstallationDismissEvents(InstallState install_state); | 127 void TrackWebApkInstallationDismissEvents(InstallState install_state); |
| 127 | 128 |
| 128 // ConfirmInfoBarDelegate: | 129 // ConfirmInfoBarDelegate: |
| 129 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | 130 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
| 130 gfx::Image GetIcon() const override; | 131 gfx::Image GetIcon() const override; |
| 131 void InfoBarDismissed() override; | 132 void InfoBarDismissed() override; |
| 132 base::string16 GetMessageText() const override; | 133 base::string16 GetMessageText() const override; |
| 133 int GetButtons() const override; | 134 int GetButtons() const override; |
| 134 bool LinkClicked(WindowOpenDisposition disposition) override; | 135 bool LinkClicked(WindowOpenDisposition disposition) override; |
| 135 | 136 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 164 | 165 |
| 165 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); | 166 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); |
| 166 }; | 167 }; |
| 167 | 168 |
| 168 // Register native methods. | 169 // Register native methods. |
| 169 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); | 170 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); |
| 170 | 171 |
| 171 } // namespace banners | 172 } // namespace banners |
| 172 | 173 |
| 173 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ | 174 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ |
| OLD | NEW |