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