summaryrefslogtreecommitdiffstats
path: root/Source/WebKit
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-07-20 13:40:08 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-07-20 13:40:09 -0700
commit4fd21b74a91e2b34470a084755d144d71564a8d9 (patch)
treeec614cb8fc332269da4a468b24a201dce1f09c5a /Source/WebKit
parentf762138fb2c8ec33fe3dec8e6bfd47e459f8f6c8 (diff)
parentad46784d9075ff6d1e11cd2be47a6169761b0eeb (diff)
downloadexternal_webkit-4fd21b74a91e2b34470a084755d144d71564a8d9.zip
external_webkit-4fd21b74a91e2b34470a084755d144d71564a8d9.tar.gz
external_webkit-4fd21b74a91e2b34470a084755d144d71564a8d9.tar.bz2
Merge "add webSetting API to allow media play without user gesture"
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/android/jni/WebSettings.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebSettings.cpp b/Source/WebKit/android/jni/WebSettings.cpp
index 467da3d..1bd3e36 100644
--- a/Source/WebKit/android/jni/WebSettings.cpp
+++ b/Source/WebKit/android/jni/WebSettings.cpp
@@ -151,6 +151,7 @@ struct FieldIds {
#endif
mOverrideCacheMode = env->GetFieldID(clazz, "mOverrideCacheMode", "I");
mPasswordEchoEnabled = env->GetFieldID(clazz, "mPasswordEchoEnabled", "Z");
+ mMediaPlaybackRequiresUserGesture = env->GetFieldID(clazz, "mMediaPlaybackRequiresUserGesture", "Z");
ALOG_ASSERT(mLayoutAlgorithm, "Could not find field mLayoutAlgorithm");
ALOG_ASSERT(mTextSize, "Could not find field mTextSize");
@@ -195,6 +196,7 @@ struct FieldIds {
ALOG_ASSERT(mUseDoubleTree, "Could not find field mUseDoubleTree");
ALOG_ASSERT(mPageCacheCapacity, "Could not find field mPageCacheCapacity");
ALOG_ASSERT(mPasswordEchoEnabled, "Could not find field mPasswordEchoEnabled");
+ ALOG_ASSERT(mMediaPlaybackRequiresUserGesture, "Could not find field mMediaPlaybackRequiresUserGesture");
jclass enumClass = env->FindClass("java/lang/Enum");
ALOG_ASSERT(enumClass, "Could not find Enum class!");
@@ -281,6 +283,7 @@ struct FieldIds {
#endif
jfieldID mOverrideCacheMode;
jfieldID mPasswordEchoEnabled;
+ jfieldID mMediaPlaybackRequiresUserGesture;
};
static struct FieldIds* gFieldIds;
@@ -616,6 +619,9 @@ public:
bool echoPassword = env->GetBooleanField(obj,
gFieldIds->mPasswordEchoEnabled);
s->setPasswordEchoEnabled(echoPassword);
+
+ flag = env->GetBooleanField(obj, gFieldIds->mMediaPlaybackRequiresUserGesture);
+ s->setMediaPlaybackRequiresUserGesture(flag);
}
};