Index: chrome/browser/android/webapk/webapk_installer.h |
diff --git a/chrome/browser/android/webapk/webapk_installer.h b/chrome/browser/android/webapk/webapk_installer.h |
index 2e356a4dccdb9d7d0c17b989c6be364fb077ad03..a440a9d5f52f6a1cb324845186cfb0ca5d3e2efd 100644 |
--- a/chrome/browser/android/webapk/webapk_installer.h |
+++ b/chrome/browser/android/webapk/webapk_installer.h |
@@ -48,7 +48,8 @@ class WebApkInstaller : public net::URLFetcherDelegate { |
// or failed. |
static void InstallAsync(content::BrowserContext* context, |
const ShortcutInfo& shortcut_info, |
- const SkBitmap& shortcut_icon, |
+ const SkBitmap& primary_icon, |
+ const SkBitmap& badge_icon, |
const FinishCallback& finish_callback); |
// Creates a self-owned WebApkInstaller instance and talks to the Chrome |
@@ -58,7 +59,7 @@ class WebApkInstaller : public net::URLFetcherDelegate { |
static void UpdateAsync( |
content::BrowserContext* context, |
const ShortcutInfo& shortcut_info, |
- const SkBitmap& shortcut_icon, |
+ const SkBitmap& primary_icon, |
const std::string& webapk_package, |
int webapk_version, |
const std::map<std::string, std::string>& icon_url_to_murmur2_hash, |
@@ -101,7 +102,8 @@ class WebApkInstaller : public net::URLFetcherDelegate { |
protected: |
WebApkInstaller(content::BrowserContext* browser_context, |
const ShortcutInfo& shortcut_info, |
- const SkBitmap& shortcut_icon); |
+ const SkBitmap& primary_icon, |
+ const SkBitmap& badge_icon); |
// Starts installion of the downloaded WebAPK. |
// |file_path| is the file path that the WebAPK was downloaded to. |
@@ -158,8 +160,14 @@ class WebApkInstaller : public net::URLFetcherDelegate { |
// net::URLFetcherDelegate: |
void OnURLFetchComplete(const net::URLFetcher* source) override; |
- // Called with the computed Murmur2 hash for the app icon. |
- void OnGotIconMurmur2Hash(const std::string& icon_murmur2_hash); |
+ // Called with the computed Murmur2 hash for the primary icon. |
+ void OnGotPrimaryIconMurmur2Hash(const std::string& primary_icon_hash); |
+ |
+ // Called with the computed Murmur2 hash for the badge icon. |
+ void OnGotBadgeIconMurmur2Hash(const std::string& badge_icon_hash); |
+ |
+ // Maps icon URLs to Murmur2 hashes. |
+ void MapIconUrlToMurmur2Hash(); |
// Sends request to WebAPK server to create WebAPK. During a successful |
// request the WebAPK server responds with the URL of the generated WebAPK. |
@@ -228,8 +236,13 @@ class WebApkInstaller : public net::URLFetcherDelegate { |
// Web Manifest info. |
const ShortcutInfo shortcut_info_; |
- // WebAPK app icon. |
- const SkBitmap shortcut_icon_; |
+ // WebAPK primary icon & its Murmur2 hash. |
+ const SkBitmap primary_icon_; |
+ std::string primary_icon_hash_; |
+ |
+ // WebAPK badge icon & its Murmur2 hash. |
+ const SkBitmap badge_icon_; |
+ std::string badge_icon_hash_; |
// WebAPK server URL. |
GURL server_url_; |