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

Unified Diff: chrome/browser/android/banners/app_banner_manager.h

Issue 921073002: [App banners] Break apart AppBannerManager and AppBannerInfoBarDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/banners/app_banner_manager.h
diff --git a/chrome/browser/android/banners/app_banner_manager.h b/chrome/browser/android/banners/app_banner_manager.h
index ca616fa5590fbe69bb8145243b1a5f646bb54e3d..0ebc062f473d9b24a520156fccfa0cf2a7ae1022 100644
--- a/chrome/browser/android/banners/app_banner_manager.h
+++ b/chrome/browser/android/banners/app_banner_manager.h
@@ -20,7 +20,6 @@
namespace content {
struct FrameNavigateParams;
struct LoadCommittedDetails;
-struct Manifest;
} // namespace content
namespace infobars {
@@ -68,8 +67,7 @@ class InfoBar;
namespace banners {
class AppBannerManager : public chrome::BitmapFetcherDelegate,
- public content::WebContentsObserver,
- public AppBannerInfoBarDelegate::AppDelegate {
+ public content::WebContentsObserver {
public:
AppBannerManager(JNIEnv* env, jobject obj);
~AppBannerManager() override;
@@ -77,9 +75,6 @@ class AppBannerManager : public chrome::BitmapFetcherDelegate,
// Destroys the AppBannerManager.
void Destroy(JNIEnv* env, jobject obj);
- // Blocks a banner for |package_name| from appearing on the domain for |url|.
- void BlockBanner(JNIEnv* env, jobject obj, jstring jurl, jstring jpackage);
-
// Observes a new WebContents, if necessary.
void ReplaceWebContents(JNIEnv* env,
jobject obj,
@@ -94,29 +89,10 @@ class AppBannerManager : public chrome::BitmapFetcherDelegate,
jstring japp_package,
jstring jicon_url);
- // Called when the installation Intent has been handled and focus has been
- // returned to Chrome.
- void OnInstallIntentReturned(JNIEnv* env,
- jobject obj,
- jboolean jis_installing);
-
- // Called when the InstallerDelegate task has finished.
- void OnInstallFinished(JNIEnv* env,
- jobject obj,
- jboolean success);
-
// Fetches the icon at the given URL asynchronously.
// Returns |false| if this couldn't be kicked off.
bool FetchIcon(const GURL& image_url);
- // Installs the app defined by the manifest.
- // TODO(dfalcantara): Fold into Install() when more CLs land.
- static void InstallManifestApp(const content::Manifest& manifest,
- const SkBitmap& icon);
-
- // Called when the AppBannerInfoBar's button needs to be updated.
- void UpdateInstallState(JNIEnv* env, jobject obj);
-
// WebContentsObserver overrides.
void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
@@ -128,14 +104,6 @@ class AppBannerManager : public chrome::BitmapFetcherDelegate,
// BitmapFetcherDelegate overrides.
void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override;
- // AppBannerInfoBarDelegate::AppDelegate overrides.
- void Block() const override;
- bool OnButtonClicked() const override;
- bool OnLinkClicked() const override;
- void OnInfoBarDestroyed() override;
- base::string16 GetTitle() const override;
- gfx::Image GetIcon() const override;
-
private:
// Gets the preferred icon size for the banner icons.
int GetPreferredIconSize();
@@ -169,16 +137,12 @@ class AppBannerManager : public chrome::BitmapFetcherDelegate,
GURL app_icon_url_;
base::string16 app_title_;
- scoped_ptr<SkBitmap> app_icon_;
content::Manifest web_app_data_;
base::android::ScopedJavaGlobalRef<jobject> native_app_data_;
std::string native_app_package_;
- // Weak pointer to the InfoBar that is being managed.
- AppBannerInfoBar* weak_infobar_ptr_;
-
// AppBannerManager on the Java side.
JavaObjectWeakGlobalRef weak_java_banner_view_manager_;
« no previous file with comments | « chrome/browser/android/banners/app_banner_infobar_delegate.cc ('k') | chrome/browser/android/banners/app_banner_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698