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_UPDATE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_MANAGER_H_ |
6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_MANAGER_H_ | 6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_MANAGER_H_ |
7 | 7 |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/android/webapk/webapk_install_service.h" |
10 | 11 |
11 // WebApkUpdateManager is the C++ counterpart of org.chromium.chrome.browser's | 12 // WebApkUpdateManager is the C++ counterpart of org.chromium.chrome.browser's |
12 // WebApkUpdateManager in Java. It calls WebApkInstaller to send an update | 13 // WebApkUpdateManager in Java. It calls WebApkInstaller to send an update |
13 // request to WebAPK Server. | 14 // request to WebAPK Server. |
14 class WebApkUpdateManager { | 15 class WebApkUpdateManager { |
15 public: | 16 public: |
16 // Registers JNI hooks. | 17 // Registers JNI hooks. |
17 static bool Register(JNIEnv* env); | 18 static bool Register(JNIEnv* env); |
18 | 19 |
19 // Called after either a request to update the WebAPK has been sent, or the | 20 // Called after either a request to update the WebAPK has been sent, or the |
20 // update process fails. |success| indicates whether the request was issued | 21 // update process fails. |success| indicates whether the request was issued |
21 // to the server. A "true" value of |success| does not guarantee that the | 22 // to the server. A "true" value of |success| does not guarantee that the |
22 // WebAPK will be successfully updated. | 23 // WebAPK will be successfully updated. |
23 static void OnBuiltWebApk(const std::string& id, | 24 static void OnBuiltWebApk( |
24 bool success, | 25 const std::string& id, |
25 const std::string& webapk_package); | 26 bool success, |
| 27 const WebApkInstallService::FinishCallbackData& data); |
26 | 28 |
27 private: | 29 private: |
28 DISALLOW_IMPLICIT_CONSTRUCTORS(WebApkUpdateManager); | 30 DISALLOW_IMPLICIT_CONSTRUCTORS(WebApkUpdateManager); |
29 }; | 31 }; |
30 | 32 |
31 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_MANAGER_H_ | 33 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_MANAGER_H_ |
OLD | NEW |