Index: chrome/browser/android/webapps/webapp_registry.cc |
diff --git a/chrome/browser/android/webapps/webapp_registry.cc b/chrome/browser/android/webapps/webapp_registry.cc |
index bb909c8cade7991cfb36e0146ed2dcea4282fdf2..65f0e6afef2a20db8e6d22a3a81ea0f69fe91548 100644 |
--- a/chrome/browser/android/webapps/webapp_registry.cc |
+++ b/chrome/browser/android/webapps/webapp_registry.cc |
@@ -6,6 +6,7 @@ |
#include "base/android/jni_android.h" |
#include "chrome/browser/android/browsing_data/url_filter_bridge.h" |
+#include "chrome/browser/ui/webui/webapk_info_callback.h" |
#include "jni/WebappRegistry_jni.h" |
using base::android::JavaParamRef; |
@@ -27,3 +28,13 @@ void WebappRegistry::ClearWebappHistoryForUrls( |
Java_WebappRegistry_clearWebappHistoryForUrls( |
base::android::AttachCurrentThread(), filter_bridge->j_bridge()); |
} |
+ |
+void WebappRegistry::ListWebAPKs( |
+ const base::RepeatingCallback<void(std::string, std::string, int, int)>& |
+ callback) { |
pkotwicz
2017/01/13 17:00:58
I think that it would be clearer if this function
gonzalon
2017/01/13 20:24:39
Returning an array was my first approach too, it w
pkotwicz
2017/01/17 03:20:16
I recommend doing this by making WebappRegistry::L
gonzalon
2017/01/17 16:45:17
I did something very similar to what you recommend
|
+ WebapkInfoCallback* webapk_info_callback = new WebapkInfoCallback(callback); |
Xi Han
2017/01/13 15:50:15
Please add a comment that the WebApkInfoCallback w
gonzalon
2017/01/13 20:24:39
Good to know! Thanks for explaining.
|
+ |
+ Java_WebappRegistry_listWebAPKs( |
+ base::android::AttachCurrentThread(), |
+ webapk_info_callback->j_webapk_info_callback()); |
Xi Han
2017/01/13 15:50:15
It is better to move this JNI call into WebApkInfo
|
+} |