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

Unified Diff: chrome/browser/android/offline_pages/offline_page_bridge.cc

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/browser/android/offline_pages/offline_page_bridge.cc
diff --git a/chrome/browser/android/offline_pages/offline_page_bridge.cc b/chrome/browser/android/offline_pages/offline_page_bridge.cc
index ff555bac14340aa2ef2088fca53a36b4170a5f84..66df1209f3bba9c9c0766e3e1924d0c58489f917 100644
--- a/chrome/browser/android/offline_pages/offline_page_bridge.cc
+++ b/chrome/browser/android/offline_pages/offline_page_bridge.cc
@@ -510,6 +510,18 @@ jboolean OfflinePageBridge::IsShowingOfflinePreview(
return offline_pages::OfflinePageUtils::IsShowingOfflinePreview(web_contents);
}
+jboolean OfflinePageBridge::IsShowingDownloadButtonInErrorPage(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ const JavaParamRef<jobject>& j_web_contents) {
+ content::WebContents* web_contents =
+ content::WebContents::FromJavaWebContents(j_web_contents);
+ if (!web_contents)
+ return false;
+ return offline_pages::OfflinePageUtils::IsShowingDownloadButtonInErrorPage(
+ web_contents);
+}
+
void OfflinePageBridge::GetRequestsInQueue(
JNIEnv* env,
const JavaParamRef<jobject>& obj,
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_bridge.h ('k') | chrome/browser/android/offline_pages/offline_page_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698