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 1b3f3b6..1f56582 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -139,6 +139,8 @@ FILE* gRenderTreeFile = 0;
namespace android {
+bool WebViewCore::s_isPaused = false;
+
// ----------------------------------------------------------------------------
#define GET_NATIVE_VIEW(env, obj) ((WebViewCore*)env->GetIntField(obj, gWebViewCoreFields.m_nativeClass))
@@ -2979,6 +2981,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)
@@ -2994,6 +2998,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 21e45ef..eab22b4 100644
--- a/WebKit/android/jni/WebViewCore.h
+++ b/WebKit/android/jni/WebViewCore.h
@@ -439,6 +439,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
@@ -495,6 +497,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;