diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-03-14 18:16:58 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2011-03-16 22:08:21 -0700 |
commit | 8e1d10880da3108f7eb53ae81682a7c4192a2e3f (patch) | |
tree | 6deb52bbc30b59fadd8f46de3211fd86e3db175d | |
parent | 9863c30dfa5b5a03577c0ad069bb04d70435ac2d (diff) | |
download | external_webkit-8e1d10880da3108f7eb53ae81682a7c4192a2e3f.zip external_webkit-8e1d10880da3108f7eb53ae81682a7c4192a2e3f.tar.gz external_webkit-8e1d10880da3108f7eb53ae81682a7c4192a2e3f.tar.bz2 |
Pass the URL at the enterfullscreen time
bug:2126902
Change-Id: I84a27fabccc32ef85c8d78d6702d22ffca497db7
-rw-r--r-- | WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp | 3 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 7 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.h | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp index 013972a..5cfa1b5 100644 --- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp @@ -574,6 +574,7 @@ void ChromeClientAndroid::enterFullscreenForNode(Node* node) return; HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node); + String url = videoElement->currentSrc(); LayerAndroid* layer = videoElement->platformLayer(); if (!layer) return; @@ -581,7 +582,7 @@ void ChromeClientAndroid::enterFullscreenForNode(Node* node) FrameView* frameView = m_webFrame->page()->mainFrame()->view(); android::WebViewCore* core = android::WebViewCore::getWebViewCore(frameView); if (core) - core->enterFullscreenForVideoLayer(layer->uniqueId()); + core->enterFullscreenForVideoLayer(layer->uniqueId(), url); } void ChromeClientAndroid::exitFullscreenForNode(Node* node) diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 834120d..c038ccd 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -398,7 +398,7 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m m_javaGlue->m_setScrollbarModes = GetJMethod(env, clazz, "setScrollbarModes", "(II)V"); m_javaGlue->m_setInstallableWebApp = GetJMethod(env, clazz, "setInstallableWebApp", "()V"); #if ENABLE(VIDEO) - m_javaGlue->m_enterFullscreenForVideoLayer = GetJMethod(env, clazz, "enterFullscreenForVideoLayer", "(I)V"); + m_javaGlue->m_enterFullscreenForVideoLayer = GetJMethod(env, clazz, "enterFullscreenForVideoLayer", "(ILjava/lang/String;)V"); #endif m_javaGlue->m_setWebTextViewAutoFillable = GetJMethod(env, clazz, "setWebTextViewAutoFillable", "(ILjava/lang/String;)V"); m_javaGlue->m_selectAt = GetJMethod(env, clazz, "selectAt", "(II)V"); @@ -3635,11 +3635,12 @@ void WebViewCore::notifyWebAppCanBeInstalled() } #if ENABLE(VIDEO) -void WebViewCore::enterFullscreenForVideoLayer(int layerId) +void WebViewCore::enterFullscreenForVideoLayer(int layerId, const WTF::String& url) { JNIEnv* env = JSC::Bindings::getJNIEnv(); + jstring jUrlStr = wtfStringToJstring(env, url); env->CallVoidMethod(m_javaGlue->object(env).get(), - m_javaGlue->m_enterFullscreenForVideoLayer, layerId); + m_javaGlue->m_enterFullscreenForVideoLayer, layerId, jUrlStr); checkException(env); } #endif diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index 59efe35..136ea79 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -541,7 +541,7 @@ namespace android { void notifyWebAppCanBeInstalled(); #if ENABLE(VIDEO) - void enterFullscreenForVideoLayer(int layerId); + void enterFullscreenForVideoLayer(int layerId, const WTF::String& url); #endif void setWebTextViewAutoFillable(int queryId, const string16& previewSummary); |