diff options
author | Kristian Monsen <kristianm@google.com> | 2011-08-15 11:25:07 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-08-16 16:01:30 +0100 |
commit | 27e51219c7edaec766eaaee11d401cf053c06103 (patch) | |
tree | 21596ba717903e1e2787f90699393eb6e5978879 /Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp | |
parent | 0f0dadb092f4aaa1a34d293f9c4b2a14e3b3e3df (diff) | |
download | external_webkit-27e51219c7edaec766eaaee11d401cf053c06103.zip external_webkit-27e51219c7edaec766eaaee11d401cf053c06103.tar.gz external_webkit-27e51219c7edaec766eaaee11d401cf053c06103.tar.bz2 |
Fix for bug 3429537 Google voice (web version) does not play messages on HC
Sending the WebView to java so it can get the private status of
the window.
Depends on frameworks/base CL: https://android-git.corp.google.com/g/#/c/127813/
Change-Id: I014ca73557ba6a2b5fb4f1051465ec7d4bb3ebd5
Diffstat (limited to 'Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp')
-rw-r--r-- | Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp | 11 |
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. |