summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2011-03-11 15:14:18 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-03-11 15:14:18 -0800
commit24e276c8e5227205806807e70f5774218c0c0d1f (patch)
tree1aab21756b3105096db14a9fd99de51558dcccb9 /WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
parente76100ecb3b42c39d42e561ebe850b122a259f50 (diff)
parentcc2679391d89b57997f78365d54d99c9ae062db3 (diff)
downloadexternal_webkit-24e276c8e5227205806807e70f5774218c0c0d1f.zip
external_webkit-24e276c8e5227205806807e70f5774218c0c0d1f.tar.gz
external_webkit-24e276c8e5227205806807e70f5774218c0c0d1f.tar.bz2
am cc267939: HTML5 Video improvements
* commit 'cc2679391d89b57997f78365d54d99c9ae062db3': HTML5 Video improvements
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
+
+
}