summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/Tab.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/Tab.java')
-rw-r--r--src/com/android/browser/Tab.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 70028ea..bab3458 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -136,6 +136,8 @@ class Tab {
// AsyncTask for downloading touch icons
DownloadTouchIcon mTouchIconLoader;
+ private Bitmap mScreenshot;
+
// All the state needed for a page
private static class PageState {
String mUrl;
@@ -191,6 +193,7 @@ class Tab {
static final String APPID = "appid";
static final String ORIGINALURL = "originalUrl";
static final String INCOGNITO = "privateBrowsingEnabled";
+ static final String SCREENSHOT = "screenshot";
// -------------------------------------------------------------------------
@@ -1720,6 +1723,9 @@ class Tab {
mSavedState.putInt(PARENTTAB, mWebViewController.getTabControl().getTabIndex(
mParentTab));
}
+ if (mScreenshot != null) {
+ mSavedState.putParcelable(SCREENSHOT, mScreenshot);
+ }
return true;
}
@@ -1735,6 +1741,7 @@ class Tab {
mSavedState = null;
mCloseOnExit = b.getBoolean(CLOSEONEXIT);
mAppId = b.getString(APPID);
+ mScreenshot = b.getParcelable(SCREENSHOT);
final WebBackForwardList list = mMainView.restoreState(b);
if (list == null) {
@@ -1758,4 +1765,12 @@ class Tab {
}
};
+ public void setScreenshot(Bitmap screenshot) {
+ mScreenshot = screenshot;
+ }
+
+ public Bitmap getScreenshot() {
+ return mScreenshot;
+ }
+
}