summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/jni')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp6
-rw-r--r--WebKit/android/jni/WebViewCore.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index fdd9e05..8414068 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -147,6 +147,8 @@ FILE* gRenderTreeFile = 0;
namespace android {
+bool WebViewCore::s_isPaused = false;
+
static SkTDArray<WebViewCore*> gInstanceList;
void WebViewCore::addInstance(WebViewCore* inst) {
@@ -2889,6 +2891,8 @@ static void Pause(JNIEnv* env, jobject obj)
SkANP::InitEvent(&event, kLifecycle_ANPEventType);
event.data.lifecycle.action = kPause_ANPLifecycleAction;
GET_NATIVE_VIEW(env, obj)->sendPluginEvent(event);
+
+ WebViewCore::setIsPaused(true);
}
static void Resume(JNIEnv* env, jobject obj)
@@ -2904,6 +2908,8 @@ static void Resume(JNIEnv* env, jobject obj)
SkANP::InitEvent(&event, kLifecycle_ANPEventType);
event.data.lifecycle.action = kResume_ANPLifecycleAction;
GET_NATIVE_VIEW(env, obj)->sendPluginEvent(event);
+
+ WebViewCore::setIsPaused(false);
}
static void FreeMemory(JNIEnv* env, jobject obj)
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h
index c4d1cae..0569b4d 100644
--- a/WebKit/android/jni/WebViewCore.h
+++ b/WebKit/android/jni/WebViewCore.h
@@ -453,6 +453,8 @@ namespace android {
// field safely from our respective threads
static Mutex gButtonMutex;
WTF::Vector<Container> m_buttons;
+ static bool isPaused() { return s_isPaused; }
+ static void setIsPaused(bool isPaused) { s_isPaused = isPaused; }
// end of shared members
// internal functions
@@ -509,6 +511,7 @@ namespace android {
unsigned m_domtree_version;
bool m_check_domtree_version;
PageGroup* m_groupForVisitedLinks;
+ static bool s_isPaused;
SkTDArray<PluginWidgetAndroid*> m_plugins;
WebCore::Timer<WebViewCore> m_pluginInvalTimer;