summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp')
-rw-r--r--Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index cad23dc..9094732 100644
--- a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -572,16 +572,6 @@ void ChromeClientAndroid::reachedApplicationCacheOriginQuota(SecurityOrigin*)
notImplemented();
}
-#if ENABLE(ANDROID_INSTALLABLE_WEB_APPS)
-void ChromeClientAndroid::webAppCanBeInstalled()
-{
- FrameView* frameView = m_webFrame->page()->mainFrame()->view();
- android::WebViewCore* core = android::WebViewCore::getWebViewCore(frameView);
- if (core)
- core->notifyWebAppCanBeInstalled();
-}
-#endif
-
#if ENABLE(VIDEO)
bool ChromeClientAndroid::supportsFullscreenForNode(const Node* node)
{
@@ -594,16 +584,23 @@ void ChromeClientAndroid::enterFullscreenForNode(Node* node)
return;
HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
- String url = videoElement->currentSrc();
- LayerAndroid* layer = videoElement->platformLayer();
- if (!layer)
- return;
FrameView* frameView = m_webFrame->page()->mainFrame()->view();
android::WebViewCore* core = android::WebViewCore::getWebViewCore(frameView);
- m_webFrame->page()->mainFrame()->document()->webkitWillEnterFullScreenForElement(videoElement);
if (core)
- core->enterFullscreenForVideoLayer(layer->uniqueId(), url);
+ core->enterFullscreenForVideoLayer();
+
+ MediaPlayer* player = videoElement->player();
+ if (player) {
+ // We need to use the same document object as the
+ // MediaPlayerPrivateAndroid::onStopFullscreen().
+ Document* doc = player->mediaPlayerClient()->mediaPlayerOwningDocument();
+ if (doc)
+ doc->webkitWillEnterFullScreenForElement(videoElement);
+ // Now the player is responsible to trigger to the java side for
+ // entering full screen mode.
+ player->enterFullscreenMode();
+ }
}
void ChromeClientAndroid::exitFullscreenForNode(Node* node)