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

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

Issue 2685363002: Update AppBannerManager & AppBannerManagerAndroid to request badge icon. (Closed)
Patch Set: Addressing comments (move can_install init to constructor) Created 3 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/banners/app_banner_manager.h
diff --git a/chrome/browser/banners/app_banner_manager.h b/chrome/browser/banners/app_banner_manager.h
index e5dab9f1c095494a4b6384c83320e833f2e2b4ff..e043913e38a07c3f7da23e1b58114e0c3a3f1e97 100644
--- a/chrome/browser/banners/app_banner_manager.h
+++ b/chrome/browser/banners/app_banner_manager.h
@@ -120,9 +120,9 @@ class AppBannerManager : public content::WebContentsObserver,
// |code|. Returns the empty string if |code| requires no parameter.
std::string GetStatusParam(InstallableStatusCode code);
- // Returns the ideal and minimum icon sizes required for being installable.
- virtual int GetIdealIconSizeInPx();
- virtual int GetMinimumIconSizeInPx();
+ // Returns the ideal and minimum primary icon size requirements.
+ virtual int GetIdealPrimaryIconSizeInPx();
+ virtual int GetMinimumPrimaryIconSizeInPx();
// Returns a WeakPtr to this object. Exposed so subclasses/infobars may
// may bind callbacks without needing their own WeakPtrFactory.
@@ -141,6 +141,10 @@ class AppBannerManager : public content::WebContentsObserver,
// manifest.
void OnDidGetManifest(const InstallableData& result);
+ // Returns an InstallableParams object that requests all checks necessary for
+ // a web app banner.
+ virtual InstallableParams ParamsToPerformInstallableCheck();
+
// Run at the conclusion of OnDidGetManifest. For web app banners, this calls
// back to the InstallableManager to continue checking criteria. For native
// app banners, this checks whether native apps are preferred in the manifest,
@@ -150,7 +154,7 @@ class AppBannerManager : public content::WebContentsObserver,
// Callback invoked by the InstallableManager once it has finished checking
// all other installable properties.
- void OnDidPerformInstallableCheck(const InstallableData& result);
+ virtual void OnDidPerformInstallableCheck(const InstallableData& result);
// Records that a banner was shown. The |event_name| corresponds to the RAPPOR
// metric being recorded.
@@ -208,11 +212,11 @@ class AppBannerManager : public content::WebContentsObserver,
// The manifest object.
content::Manifest manifest_;
- // The URL of the icon.
- GURL icon_url_;
+ // The URL of the primary icon.
+ GURL primary_icon_url_;
- // The icon object.
- std::unique_ptr<SkBitmap> icon_;
+ // The primary icon object.
+ std::unique_ptr<SkBitmap> primary_icon_;
// The referrer string (if any) specified in the app URL. Used only for native
// app banners.
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager_android.cc ('k') | chrome/browser/banners/app_banner_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698