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

Unified Diff: chrome/browser/android/offline_pages/offline_page_utils.h

Issue 2362033002: Showing previews UI for Offline Previews (Closed)
Patch Set: megjablon comments rebase Created 4 years, 2 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_utils.h
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.h b/chrome/browser/android/offline_pages/offline_page_utils.h
index fb69cbf920025baad3560fc4526498e1ad435ad8..a73dfb74d0be9b412adceee3d96e3acb0248ee02 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils.h
+++ b/chrome/browser/android/offline_pages/offline_page_utils.h
@@ -60,19 +60,23 @@ class OfflinePageUtils {
// returned pointer is owned by the web_contents and may be deleted by user
// navigation, so it is unsafe to store a copy of the returned pointer.
static const OfflinePageItem* GetOfflinePageFromWebContents(
content::WebContents* web_contents);
// Gets the offline header provided when loading the offline page for the
// given web contents.
static const OfflinePageHeader* GetOfflineHeaderFromWebContents(
content::WebContents* web_contents);
+ // Returns whether the offline page corresponding to |web_contents| is part of
+ // previews/. If there is no offline page for |web_contents|, returns false.
+ static bool IsShowingOfflinePreview(content::WebContents* web_contents);
+
// Gets an Android Tab ID from a tab containing |web_contents|. Returns false,
// when tab is not available. Returns true otherwise and sets |tab_id| to the
// ID of the tab.
static bool GetTabId(content::WebContents* web_contents, int* tab_id);
};
} // namespace offline_pages
#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698