| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 // Delegate for promoting a web app. | 95 // Delegate for promoting a web app. |
| 96 AppBannerInfoBarDelegateAndroid( | 96 AppBannerInfoBarDelegateAndroid( |
| 97 base::WeakPtr<AppBannerManager> weak_manager, | 97 base::WeakPtr<AppBannerManager> weak_manager, |
| 98 const base::string16& app_title, | 98 const base::string16& app_title, |
| 99 std::unique_ptr<ShortcutInfo> info, | 99 std::unique_ptr<ShortcutInfo> info, |
| 100 std::unique_ptr<SkBitmap> icon, | 100 std::unique_ptr<SkBitmap> icon, |
| 101 int event_request_id, | 101 int event_request_id, |
| 102 bool is_webapk, | 102 bool is_webapk, |
| 103 bool is_webapk_already_installed, | |
| 104 webapk::InstallSource webapk_install_source); | 103 webapk::InstallSource webapk_install_source); |
| 105 | 104 |
| 106 // Delegate for promoting an Android app. | 105 // Delegate for promoting an Android app. |
| 107 AppBannerInfoBarDelegateAndroid( | 106 AppBannerInfoBarDelegateAndroid( |
| 108 const base::string16& app_title, | 107 const base::string16& app_title, |
| 109 const base::android::ScopedJavaGlobalRef<jobject>& native_app_data, | 108 const base::android::ScopedJavaGlobalRef<jobject>& native_app_data, |
| 110 std::unique_ptr<SkBitmap> icon, | 109 std::unique_ptr<SkBitmap> icon, |
| 111 const std::string& native_app_package, | 110 const std::string& native_app_package, |
| 112 const std::string& referrer, | 111 const std::string& referrer, |
| 113 int event_request_id); | 112 int event_request_id); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 base::android::ScopedJavaGlobalRef<jobject> native_app_data_; | 152 base::android::ScopedJavaGlobalRef<jobject> native_app_data_; |
| 154 | 153 |
| 155 std::unique_ptr<SkBitmap> icon_; | 154 std::unique_ptr<SkBitmap> icon_; |
| 156 | 155 |
| 157 std::string native_app_package_; | 156 std::string native_app_package_; |
| 158 std::string referrer_; | 157 std::string referrer_; |
| 159 int event_request_id_; | 158 int event_request_id_; |
| 160 bool has_user_interaction_; | 159 bool has_user_interaction_; |
| 161 | 160 |
| 162 bool is_webapk_; | 161 bool is_webapk_; |
| 163 bool is_webapk_already_installed_; | |
| 164 | 162 |
| 165 // Indicates the current state of a WebAPK installation. | 163 // Indicates the current state of a WebAPK installation. |
| 166 InstallState install_state_; | 164 InstallState install_state_; |
| 167 | 165 |
| 168 // Tracks how long it takes to install a WebAPK. | 166 // Tracks how long it takes to install a WebAPK. |
| 169 std::unique_ptr<base::ElapsedTimer> timer_; | 167 std::unique_ptr<base::ElapsedTimer> timer_; |
| 170 | 168 |
| 171 // Indicates the way in which a WebAPK (if applicable) is installed: from the | 169 // Indicates the way in which a WebAPK (if applicable) is installed: from the |
| 172 // menu or from an app banner. | 170 // menu or from an app banner. |
| 173 webapk::InstallSource webapk_install_source_; | 171 webapk::InstallSource webapk_install_source_; |
| 174 | 172 |
| 175 base::WeakPtrFactory<AppBannerInfoBarDelegateAndroid> weak_ptr_factory_; | 173 base::WeakPtrFactory<AppBannerInfoBarDelegateAndroid> weak_ptr_factory_; |
| 176 | 174 |
| 177 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); | 175 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); |
| 178 }; | 176 }; |
| 179 | 177 |
| 180 // Register native methods. | 178 // Register native methods. |
| 181 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); | 179 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); |
| 182 | 180 |
| 183 } // namespace banners | 181 } // namespace banners |
| 184 | 182 |
| 185 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ | 183 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ |
| OLD | NEW |