Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: chrome/browser/android/banners/app_banner_manager_android.h

Issue 2778983005: Allow the app banner installability check to run on page load. (Closed)
Patch Set: Address comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/banners/app_banner_manager_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/banners/app_banner_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698