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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 1410343007: Add "SHOW ALL SAVED PAGES" button to offline error page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix after rebase Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/net/net_error_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 029e63695cdff20bfe14a7672cf6999de2d29ced..2d0e15b561ec78ae2a5e4b15d6782c5c23994661 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -287,6 +287,20 @@ void TabAndroid::MakeLoadURLParams(
}
}
+bool TabAndroid::HasOfflinePages() const {
+ if (!offline_pages::IsOfflinePagesEnabled())
+ return false;
+ offline_pages::OfflinePageModel* offline_page_model =
+ offline_pages::OfflinePageModelFactory::GetForBrowserContext(
+ GetProfile());
+ return !offline_page_model->GetAllPages().empty();
+}
+
+void TabAndroid::ShowOfflinePages() {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ Java_Tab_showOfflinePages(env, weak_java_tab_.get(env).obj());
+}
+
void TabAndroid::SwapTabContents(content::WebContents* old_contents,
content::WebContents* new_contents,
bool did_start_load,
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/net/net_error_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698