diff options
| author | 2009-12-02 11:43:56 -0800 | |
|---|---|---|
| committer | 2009-12-02 11:43:56 -0800 | |
| commit | 4eeace3db541bd6fa0034a996630768cb521f2eb (patch) | |
| tree | 607cfd4bfcbae999e2c5447e5c549f57fa344373 | |
| parent | f307ec5d82ce75112eb60118db89dbfee6819e90 (diff) | |
| parent | 097b1e777a2a29eef3938338cb0c355203bf1448 (diff) | |
Merge change I097b1e77 into eclair-mr2
* changes:
Add PageCacheCapacity to the WebSettings.
| -rw-r--r-- | core/java/android/webkit/WebSettings.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index 8e40b23abaeb..d5bb572ac801 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -152,6 +152,7 @@ public class WebSettings { private int mMinimumLogicalFontSize = 8; private int mDefaultFontSize = 16; private int mDefaultFixedFontSize = 13; + private int mPageCacheCapacity = 0; private boolean mLoadsImagesAutomatically = true; private boolean mBlockNetworkImage = false; private boolean mBlockNetworkLoads; @@ -879,6 +880,20 @@ public class WebSettings { } /** + * Set the number of pages cached by the WebKit for the history navigation. + * @param size A non-negative integer between 0 (no cache) and 20 (max). + * @hide + */ + public synchronized void setPageCacheCapacity(int size) { + if (size < 0) size = 0; + if (size > 20) size = 20; + if (mPageCacheCapacity != size) { + mPageCacheCapacity = size; + postSync(); + } + } + + /** * Tell the WebView to load image resources automatically. * @param flag True if the WebView should load images automatically. */ |