| 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_MANAGER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ | 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 : public AppBannerManager, | 32 : public AppBannerManager, |
| 33 public content::WebContentsUserData<AppBannerManagerAndroid> { | 33 public content::WebContentsUserData<AppBannerManagerAndroid> { |
| 34 public: | 34 public: |
| 35 explicit AppBannerManagerAndroid(content::WebContents* web_contents); | 35 explicit AppBannerManagerAndroid(content::WebContents* web_contents); |
| 36 ~AppBannerManagerAndroid() override; | 36 ~AppBannerManagerAndroid() override; |
| 37 | 37 |
| 38 // Returns a reference to the Java-side AppBannerManager owned by this object. | 38 // Returns a reference to the Java-side AppBannerManager owned by this object. |
| 39 const base::android::ScopedJavaGlobalRef<jobject>& GetJavaBannerManager() | 39 const base::android::ScopedJavaGlobalRef<jobject>& GetJavaBannerManager() |
| 40 const; | 40 const; |
| 41 | 41 |
| 42 // Returns true if this object is currently active. | 42 // Returns true if the banner pipeline is currently running. |
| 43 bool IsActiveForTesting(JNIEnv* env, | 43 bool IsActiveForTesting(JNIEnv* env, |
| 44 const base::android::JavaParamRef<jobject>& jobj); | 44 const base::android::JavaParamRef<jobject>& jobj); |
| 45 | 45 |
| 46 // Informs the InstallableManager for the WebContents we are attached to that |
| 47 // the add to homescreen menu item has been tapped. |
| 48 void RecordMenuItemAddToHomescreen( |
| 49 JNIEnv* env, |
| 50 const base::android::JavaParamRef<jobject>& jobj); |
| 51 |
| 52 // Informs the InstallableManager for the WebContents we are attached to that |
| 53 // the menu has been opened. |
| 54 void RecordMenuOpen(JNIEnv* env, |
| 55 const base::android::JavaParamRef<jobject>& jobj); |
| 56 |
| 46 // Called when the Java-side has retrieved information for the app. | 57 // Called when the Java-side has retrieved information for the app. |
| 47 // Returns |false| if an icon fetch couldn't be kicked off. | 58 // Returns |false| if an icon fetch couldn't be kicked off. |
| 48 bool OnAppDetailsRetrieved( | 59 bool OnAppDetailsRetrieved( |
| 49 JNIEnv* env, | 60 JNIEnv* env, |
| 50 const base::android::JavaParamRef<jobject>& obj, | 61 const base::android::JavaParamRef<jobject>& obj, |
| 51 const base::android::JavaParamRef<jobject>& japp_data, | 62 const base::android::JavaParamRef<jobject>& japp_data, |
| 52 const base::android::JavaParamRef<jstring>& japp_title, | 63 const base::android::JavaParamRef<jstring>& japp_title, |
| 53 const base::android::JavaParamRef<jstring>& japp_package, | 64 const base::android::JavaParamRef<jstring>& japp_package, |
| 54 const base::android::JavaParamRef<jstring>& jicon_url); | 65 const base::android::JavaParamRef<jstring>& jicon_url); |
| 55 | 66 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 129 |
| 119 // Whether WebAPKs can be installed. | 130 // Whether WebAPKs can be installed. |
| 120 bool can_install_webapk_; | 131 bool can_install_webapk_; |
| 121 | 132 |
| 122 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid); | 133 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid); |
| 123 }; | 134 }; |
| 124 | 135 |
| 125 } // namespace banners | 136 } // namespace banners |
| 126 | 137 |
| 127 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ | 138 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
| OLD | NEW |