Index: content/browser/web_contents/navigation_entry_impl.h |
diff --git a/content/browser/web_contents/navigation_entry_impl.h b/content/browser/web_contents/navigation_entry_impl.h |
index ba13c147fd44b14eed9b8cae8fc866075ec15c24..f69cec9a2a879f6ec1c79fb84e314ca62369776e 100644 |
--- a/content/browser/web_contents/navigation_entry_impl.h |
+++ b/content/browser/web_contents/navigation_entry_impl.h |
@@ -167,6 +167,11 @@ class CONTENT_EXPORT NavigationEntryImpl |
should_replace_entry_ = should_replace_entry; |
} |
+ void SetScreenshotPNGData(const std::vector<unsigned char>& png_data); |
+ const scoped_refptr<base::RefCountedBytes> screenshot() const { |
+ return screenshot_; |
+ } |
+ |
private: |
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
// Session/Tab restore save portions of this class so that it can be recreated |
@@ -203,6 +208,15 @@ class CONTENT_EXPORT NavigationEntryImpl |
// copied with compiler provided copy constructor. |
scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; |
+ // This is also a transient member (i.e. is not persisted with session |
+ // restore). The screenshot of a page is taken when navigating away from the |
+ // page. This screenshot is displayed during an overscroll-navigation |
+ // gesture. |screenshot_| will be NULL when the screenshot is not available |
+ // (e.g. after a session restore, or if taking the screenshot of a page |
+ // failed). The UI is responsible for dealing with missing screenshots |
+ // appropriately (e.g. display a placeholder image instead). |
+ scoped_refptr<base::RefCountedBytes> screenshot_; |
+ |
// This member is not persisted with session restore. |
std::string extra_headers_; |