summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp')
-rw-r--r--WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index 980c03e..ca28932 100644
--- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -37,7 +37,10 @@
#include "FrameLoader.h"
#include "FrameView.h"
#include "Geolocation.h"
+#include "HTMLMediaElement.h"
+#include "HTMLNames.h"
#include "Icon.h"
+#include "LayerAndroid.h"
#include "Page.h"
#include "PopupMenuAndroid.h"
#include "ScriptController.h"
@@ -557,4 +560,32 @@ void ChromeClientAndroid::webAppCanBeInstalled()
}
#endif
+#if ENABLE(VIDEO)
+bool ChromeClientAndroid::supportsFullscreenForNode(const Node* node)
+{
+ return node->hasTagName(HTMLNames::videoTag);
+}
+
+void ChromeClientAndroid::enterFullscreenForNode(Node* node)
+{
+ if (!node->hasTagName(HTMLNames::videoTag))
+ return;
+
+ HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
+ LayerAndroid* layer = videoElement->platformLayer();
+ if (!layer)
+ return;
+
+ FrameView* frameView = m_webFrame->page()->mainFrame()->view();
+ android::WebViewCore* core = android::WebViewCore::getWebViewCore(frameView);
+ if (core)
+ core->enterFullscreenForVideoLayer(layer->uniqueId());
+}
+
+void ChromeClientAndroid::exitFullscreenForNode(Node* node)
+{
+}
+#endif
+
+
}