Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java |
| index dac6da2d47f568ed19b6ef8eea0d5efd56a315b7..83d51c6d6ce36c23bbcdd2bc56eaee7c3e6e9655 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java |
| @@ -25,6 +25,7 @@ import java.util.Set; |
| @JNINamespace("offline_pages::android") |
| public class OfflinePageBridge { |
| public static final String BOOKMARK_NAMESPACE = "bookmark"; |
| + public static final String SHARE_NAMESPACE = "share"; |
|
fgorski
2016/08/08 17:59:22
I believe this only works, because we never save t
Vivian
2016/08/08 21:40:36
Yes I believe so. Didn't see we use this namespace
fgorski
2016/08/08 23:10:34
Adding a new flag has some problems here. We shoul
|
| /** |
| * Retrieves the OfflinePageBridge for the given profile, creating it the first time |
| @@ -270,6 +271,15 @@ public class OfflinePageBridge { |
| } |
| /** |
| + * Get the offline page associated with the provided online URL. |
| + * |
| + * @param onlineUrl URL of the web page. |
| + */ |
| + public OfflinePageItem getBestPageForOnlineURL(String onlineUrl) { |
|
fgorski
2016/08/08 17:59:22
please use asynchronous version.
Vivian
2016/08/08 21:40:36
Done.
|
| + return nativeGetBestPageForOnlineURL(mNativeOfflinePageBridge, onlineUrl); |
| + } |
| + |
| + /** |
| * Get the offline page associated with the provided offline URL. |
| * |
| * @param offlineUrl URL pointing to the offline copy of the web page. |
| @@ -281,6 +291,15 @@ public class OfflinePageBridge { |
| } |
| /** |
| + * Get the offline page associated with the provided offline id. |
| + * |
| + * @param offlineId URL pointing to the offline copy of the web page. |
| + */ |
| + public OfflinePageItem getPageByOfflineId(long offlineId) { |
|
fgorski
2016/08/08 17:59:22
please use asynchronous version.
Vivian
2016/08/08 21:40:36
Done.
|
| + return nativeGetPageByOfflineId(mNativeOfflinePageBridge, offlineId); |
| + } |
| + |
| + /** |
| * Saves the web page loaded into web contents offline. |
| * |
| * @param webContents Contents of the page to save. |