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 9a8520c269cc211d55bc5a8b3c2a3de6dd8d09e0..109b42c0fb4ffc69790821ee73145f7bd4f4cd6b 100644 |
--- a/chrome/browser/android/banners/app_banner_manager.h |
+++ b/chrome/browser/android/banners/app_banner_manager.h |
@@ -27,6 +27,8 @@ namespace infobars { |
class InfoBar; |
} // namspace infobars |
+class BannerBitmapFetcher; |
benwells
2015/02/16 01:58:43
Nit: I think it is nicer to put this inside AppBan
gone
2015/02/17 22:56:52
Done.
|
+ |
/** |
* Manages when an app banner is created or dismissed. |
* |
@@ -67,8 +69,7 @@ class InfoBar; |
namespace banners { |
-class AppBannerManager : public chrome::BitmapFetcherDelegate, |
- public content::WebContentsObserver { |
+class AppBannerManager : public content::WebContentsObserver { |
public: |
AppBannerManager(JNIEnv* env, jobject obj); |
~AppBannerManager() override; |
@@ -94,6 +95,11 @@ class AppBannerManager : public chrome::BitmapFetcherDelegate, |
// Returns |false| if this couldn't be kicked off. |
bool FetchIcon(const GURL& image_url); |
+ // Called when everything required to show a banner is ready. |
+ void OnFetchComplete(BannerBitmapFetcher* fetcher, |
+ const GURL url, |
+ const SkBitmap* icon); |
+ |
// Return how many fetchers are active. |
int GetNumActiveFetchers(JNIEnv* env, jobject jobj); |
@@ -108,9 +114,6 @@ class AppBannerManager : public chrome::BitmapFetcherDelegate, |
const GURL& validated_url) override; |
bool OnMessageReceived(const IPC::Message& message) override; |
- // BitmapFetcherDelegate overrides. |
- void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; |
- |
private: |
// Gets the preferred icon size for the banner icons. |
int GetPreferredIconSize(); |
@@ -139,7 +142,9 @@ class AppBannerManager : public chrome::BitmapFetcherDelegate, |
bool CheckIfShouldShow(const std::string& package_or_start_url); |
// Fetches the icon for an app. |
- scoped_ptr<chrome::BitmapFetcher> fetcher_; |
+ typedef std::vector<BannerBitmapFetcher*> BitmapFetcherVector; |
+ BitmapFetcherVector active_fetchers_; |
+ |
GURL validated_url_; |
GURL app_icon_url_; |