summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebViewCore.h
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-05-08 16:28:15 -0700
committerJohn Reck <jreck@google.com>2012-05-08 16:44:20 -0700
commit35caaaf726b8b17cec92747a1fe42dba44d6b775 (patch)
treedb677de6efc417f232ff8ca6f4c60049f08fec50 /Source/WebKit/android/jni/WebViewCore.h
parent828c3a7d6b11b21de7ddfbe200eb62b3a0ef0c41 (diff)
downloadexternal_webkit-35caaaf726b8b17cec92747a1fe42dba44d6b775.zip
external_webkit-35caaaf726b8b17cec92747a1fe42dba44d6b775.tar.gz
external_webkit-35caaaf726b8b17cec92747a1fe42dba44d6b775.tar.bz2
Disable prerenders if we aren't focused
Bug: 6448418 Change-Id: I624d78a2b674cbd91ebe70008c70967101fbb12a
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.h')
-rw-r--r--Source/WebKit/android/jni/WebViewCore.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.h b/Source/WebKit/android/jni/WebViewCore.h
index 4603cb8..c8b10d8 100644
--- a/Source/WebKit/android/jni/WebViewCore.h
+++ b/Source/WebKit/android/jni/WebViewCore.h
@@ -50,6 +50,7 @@
#include <androidfw/KeycodeLabels.h>
#include <ui/PixelFormat.h>
#include <utils/threads.h>
+#include <wtf/Threading.h>
namespace WebCore {
class Color;
@@ -605,6 +606,8 @@ namespace android {
int m_lastGeneration; // last action using up to date cache
// end of shared members
+ void setPrerenderingEnabled(bool enable);
+
// internal functions
private:
enum InputType {
@@ -740,6 +743,8 @@ namespace android {
// called from destructor, to remove this from a global list
static void removeInstance(WebViewCore*);
+ bool prerenderingEnabled();
+
friend class ListBoxReply;
struct JavaGlue;
struct JavaGlue* m_javaGlue;
@@ -792,6 +797,9 @@ namespace android {
#endif
scoped_refptr<WebRequestContext> m_webRequestContext;
+
+ WTF::Mutex m_prerenderLock;
+ bool m_prerenderEnabled;
};
} // namespace android