OLD | NEW |
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 26 matching lines...) Expand all Loading... |
37 explicit WebApkInstallService(content::BrowserContext* browser_context); | 37 explicit WebApkInstallService(content::BrowserContext* browser_context); |
38 ~WebApkInstallService() override; | 38 ~WebApkInstallService() override; |
39 | 39 |
40 // Returns whether an install for |web_manifest_url| is in progress. | 40 // Returns whether an install for |web_manifest_url| is in progress. |
41 bool IsInstallInProgress(const GURL& web_manifest_url); | 41 bool IsInstallInProgress(const GURL& web_manifest_url); |
42 | 42 |
43 // Talks to the Chrome WebAPK server to generate a WebAPK on the server and to | 43 // Talks to the Chrome WebAPK server to generate a WebAPK on the server and to |
44 // Google Play to install the downloaded WebAPK. Calls |callback| once the | 44 // Google Play to install the downloaded WebAPK. Calls |callback| once the |
45 // install completed or failed. | 45 // install completed or failed. |
46 void InstallAsync(const ShortcutInfo& shortcut_info, | 46 void InstallAsync(const ShortcutInfo& shortcut_info, |
47 const SkBitmap& shortcut_icon, | 47 const SkBitmap& primary_icon, |
| 48 const SkBitmap& badge_icon, |
48 const FinishCallback& finish_callback); | 49 const FinishCallback& finish_callback); |
49 | 50 |
50 // Talks to the Chrome WebAPK server to update a WebAPK on the server and to | 51 // Talks to the Chrome WebAPK server to update a WebAPK on the server and to |
51 // the Google Play server to install the downloaded WebAPK. Calls |callback| | 52 // the Google Play server to install the downloaded WebAPK. Calls |callback| |
52 // after the request to install the WebAPK is sent to Google Play. | 53 // after the request to install the WebAPK is sent to Google Play. |
53 void UpdateAsync( | 54 void UpdateAsync( |
54 const ShortcutInfo& shortcut_info, | 55 const ShortcutInfo& shortcut_info, |
55 const SkBitmap& shortcut_icon, | 56 const SkBitmap& shortcut_icon, |
56 const std::string& webapk_package, | 57 const std::string& webapk_package, |
57 int webapk_version, | 58 int webapk_version, |
(...skipping 13 matching lines...) Expand all Loading... |
71 // In progress installs. | 72 // In progress installs. |
72 std::set<GURL> installs_; | 73 std::set<GURL> installs_; |
73 | 74 |
74 // Used to get |weak_ptr_|. | 75 // Used to get |weak_ptr_|. |
75 base::WeakPtrFactory<WebApkInstallService> weak_ptr_factory_; | 76 base::WeakPtrFactory<WebApkInstallService> weak_ptr_factory_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(WebApkInstallService); | 78 DISALLOW_COPY_AND_ASSIGN(WebApkInstallService); |
78 }; | 79 }; |
79 | 80 |
80 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ | 81 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_H_ |
OLD | NEW |