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 #include "chrome/browser/android/banners/app_banner_manager_android.h" | 5 #include "chrome/browser/android/banners/app_banner_manager_android.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 primary_icon_ = bitmap; | 233 primary_icon_ = bitmap; |
234 SendBannerPromptRequest(); | 234 SendBannerPromptRequest(); |
235 } | 235 } |
236 | 236 |
237 void AppBannerManagerAndroid::ResetCurrentPageData() { | 237 void AppBannerManagerAndroid::ResetCurrentPageData() { |
238 AppBannerManager::ResetCurrentPageData(); | 238 AppBannerManager::ResetCurrentPageData(); |
239 native_app_data_.Reset(); | 239 native_app_data_.Reset(); |
240 native_app_package_ = ""; | 240 native_app_package_ = ""; |
241 } | 241 } |
242 | 242 |
243 void AppBannerManagerAndroid::ShowBanner() { | 243 void AppBannerManagerAndroid::ShowBannerUI() { |
244 content::WebContents* contents = web_contents(); | 244 content::WebContents* contents = web_contents(); |
245 DCHECK(contents); | 245 DCHECK(contents); |
246 | 246 |
247 if (native_app_data_.is_null()) { | 247 if (native_app_data_.is_null()) { |
248 if (AppBannerInfoBarDelegateAndroid::Create( | 248 if (AppBannerInfoBarDelegateAndroid::Create( |
249 contents, GetWeakPtr(), app_title_, | 249 contents, GetWeakPtr(), app_title_, |
250 CreateShortcutInfo(manifest_url_, manifest_, primary_icon_url_, | 250 CreateShortcutInfo(manifest_url_, manifest_, primary_icon_url_, |
251 badge_icon_url_, can_install_webapk_), | 251 badge_icon_url_, can_install_webapk_), |
252 primary_icon_, badge_icon_, event_request_id(), can_install_webapk_, | 252 primary_icon_, badge_icon_, event_request_id(), can_install_webapk_, |
253 webapk::INSTALL_SOURCE_BANNER)) { | 253 webapk::INSTALL_SOURCE_BANNER)) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 } | 372 } |
373 | 373 |
374 // static | 374 // static |
375 void SetTotalEngagementToTrigger(JNIEnv* env, | 375 void SetTotalEngagementToTrigger(JNIEnv* env, |
376 const JavaParamRef<jclass>& clazz, | 376 const JavaParamRef<jclass>& clazz, |
377 jdouble engagement) { | 377 jdouble engagement) { |
378 AppBannerSettingsHelper::SetTotalEngagementToTrigger(engagement); | 378 AppBannerSettingsHelper::SetTotalEngagementToTrigger(engagement); |
379 } | 379 } |
380 | 380 |
381 } // namespace banners | 381 } // namespace banners |
OLD | NEW |