Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3202)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java

Issue 2588253002: Enable download page action for error page (Closed)
Patch Set: Address download feedback Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 04d12de78185e6702704f5cf23fc9c652e912854..f2f42ff68774c0cc1a37078937f4566e626962bc 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
@@ -24,6 +24,7 @@ import java.util.Set;
*/
@JNINamespace("offline_pages::android")
public class OfflinePageBridge {
+ public static final String ASYNC_NAMESPACE = "async_loading";
public static final String BOOKMARK_NAMESPACE = "bookmark";
public static final String SHARE_NAMESPACE = "share";
@@ -398,6 +399,14 @@ public class OfflinePageBridge {
return nativeIsShowingOfflinePreview(mNativeOfflinePageBridge, webContents);
}
+ /**
+ * @return True if download button is being shown in the error page.
+ * @param webContents Contents of the page to check.
+ */
+ public boolean isShowingDownloadButtonInErrorPage(WebContents webContents) {
+ return nativeIsShowingDownloadButtonInErrorPage(mNativeOfflinePageBridge, webContents);
+ }
+
private static class CheckPagesExistOfflineCallbackInternal {
private Callback<Set<String>> mCallback;
@@ -525,4 +534,6 @@ public class OfflinePageBridge {
long nativeOfflinePageBridge, WebContents webContents);
private native boolean nativeIsShowingOfflinePreview(
long nativeOfflinePageBridge, WebContents webContents);
+ private native boolean nativeIsShowingDownloadButtonInErrorPage(
+ long nativeOfflinePageBridge, WebContents webContents);
}

Powered by Google App Engine
This is Rietveld 408576698