summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-08-17 02:41:34 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-17 02:41:34 -0700
commita20260cdd58c5704fa177bc2054bceb933076292 (patch)
tree681dc9650d42ba3881cfd966278b58ff39691582 /Source
parent07aa959fa52483a9343d1ba669bf0f47eeb608d4 (diff)
parent27e51219c7edaec766eaaee11d401cf053c06103 (diff)
downloadexternal_webkit-a20260cdd58c5704fa177bc2054bceb933076292.zip
external_webkit-a20260cdd58c5704fa177bc2054bceb933076292.tar.gz
external_webkit-a20260cdd58c5704fa177bc2054bceb933076292.tar.bz2
Merge "Fix for bug 3429537 Google voice (web version) does not play messages on HC"
Diffstat (limited to 'Source')
-rw-r--r--Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp b/Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp
index ae8bec8..339e91b 100644
--- a/Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp
+++ b/Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp
@@ -441,7 +441,7 @@ public:
return;
m_glue = new JavaGlue;
- m_glue->m_newInstance = env->GetMethodID(clazz, "<init>", "(I)V");
+ m_glue->m_newInstance = env->GetMethodID(clazz, "<init>", "(Landroid/webkit/WebViewCore;I)V");
m_glue->m_setDataSource = env->GetMethodID(clazz, "setDataSource", "(Ljava/lang/String;)V");
m_glue->m_play = env->GetMethodID(clazz, "play", "()V");
m_glue->m_getMaxTimeSeekable = env->GetMethodID(clazz, "getMaxTimeSeekable", "()F");
@@ -469,10 +469,17 @@ public:
if (!clazz)
return;
+ FrameView* frameView = m_player->mediaPlayerClient()->mediaPlayerOwningDocument()->view();
+ if (!frameView)
+ return;
+ AutoJObject javaObject = WebViewCore::getWebViewCore(frameView)->getJavaObject();
+ if (!javaObject.get())
+ return;
+
jobject obj = 0;
// Get the HTML5Audio instance
- obj = env->NewObject(clazz, m_glue->m_newInstance, this);
+ obj = env->NewObject(clazz, m_glue->m_newInstance, javaObject.get(), this);
m_glue->m_javaProxy = env->NewGlobalRef(obj);
// Clean up.