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

Side by Side Diff: chrome/browser/android/webapk/webapk_install_service.h

Issue 2921623004: Support badge icon in WebAPK update components (Closed)
Patch Set: rebase Created 3 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_
6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ 6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void InstallAsync(const ShortcutInfo& shortcut_info, 60 void InstallAsync(const ShortcutInfo& shortcut_info,
61 const SkBitmap& primary_icon, 61 const SkBitmap& primary_icon,
62 const SkBitmap& badge_icon, 62 const SkBitmap& badge_icon,
63 const FinishCallback& finish_callback); 63 const FinishCallback& finish_callback);
64 64
65 // Talks to the Chrome WebAPK server to update a WebAPK on the server and to 65 // Talks to the Chrome WebAPK server to update a WebAPK on the server and to
66 // the Google Play server to install the downloaded WebAPK. Calls |callback| 66 // the Google Play server to install the downloaded WebAPK. Calls |callback|
67 // after the request to install the WebAPK is sent to Google Play. 67 // after the request to install the WebAPK is sent to Google Play.
68 void UpdateAsync( 68 void UpdateAsync(
69 const ShortcutInfo& shortcut_info, 69 const ShortcutInfo& shortcut_info,
70 const SkBitmap& shortcut_icon, 70 const SkBitmap& primary_icon,
71 const SkBitmap& badge_icon,
71 const std::string& webapk_package, 72 const std::string& webapk_package,
72 int webapk_version, 73 int webapk_version,
73 const std::map<std::string, std::string>& icon_url_to_murmur2_hash, 74 const std::map<std::string, std::string>& icon_url_to_murmur2_hash,
74 bool is_manifest_stale, 75 bool is_manifest_stale,
75 const FinishCallback& finish_callback); 76 const FinishCallback& finish_callback);
76 77
77 private: 78 private:
78 // Called once the install/update completed or failed. 79 // Called once the install/update completed or failed.
79 void OnFinishedInstall(const GURL& web_manifest_url, 80 void OnFinishedInstall(const GURL& web_manifest_url,
80 const FinishCallback& finish_callback, 81 const FinishCallback& finish_callback,
81 WebApkInstallResult result, 82 WebApkInstallResult result,
82 bool relax_updates, 83 bool relax_updates,
83 const std::string& webapk_package_name); 84 const std::string& webapk_package_name);
84 85
85 content::BrowserContext* browser_context_; 86 content::BrowserContext* browser_context_;
86 87
87 // In progress installs. 88 // In progress installs.
88 std::set<GURL> installs_; 89 std::set<GURL> installs_;
89 90
90 // Used to get |weak_ptr_|. 91 // Used to get |weak_ptr_|.
91 base::WeakPtrFactory<WebApkInstallService> weak_ptr_factory_; 92 base::WeakPtrFactory<WebApkInstallService> weak_ptr_factory_;
92 93
93 DISALLOW_COPY_AND_ASSIGN(WebApkInstallService); 94 DISALLOW_COPY_AND_ASSIGN(WebApkInstallService);
94 }; 95 };
95 96
96 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ 97 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698