| 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 0a6ace7bfd373b6ab91197e5557a3042f4a6a17a..feb75b4f75df177314d6832979230bf2d517f583 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
|
| @@ -26,6 +26,7 @@ import java.util.UUID;
|
| @JNINamespace("offline_pages::android")
|
| public class OfflinePageBridge {
|
| public static final String BOOKMARK_NAMESPACE = "bookmark";
|
| + public static final String SHARE_NAMESPACE = "share";
|
|
|
| /**
|
| * Retrieves the OfflinePageBridge for the given profile, creating it the first time
|
| @@ -271,6 +272,24 @@ public class OfflinePageBridge {
|
| }
|
|
|
| /**
|
| + * Get the offline page associated with the provided offline ID.
|
| + *
|
| + * @param offlineId ID of the offline page.
|
| + * @param callback callback to pass back the
|
| + * matching {@link OfflinePageItem} if found. Will pass back <code>null</code> if not.
|
| + */
|
| + public void getPageByOfflineId(final long offlineId, final Callback<OfflinePageItem> callback) {
|
| + runWhenLoaded(new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + OfflinePageItem item =
|
| + nativeGetPageByOfflineId(mNativeOfflinePageBridge, offlineId);
|
| + callback.onResult(item);
|
| + }
|
| + });
|
| + }
|
| +
|
| + /**
|
| * Saves the web page loaded into web contents offline.
|
| *
|
| * @param webContents Contents of the page to save.
|
|
|