summaryrefslogtreecommitdiffstats
path: root/WebCore/plugins
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-12-16 11:39:26 -0800
committerGrace Kloba <klobag@google.com>2009-12-16 11:39:26 -0800
commitfcce71fa296bf3b42bfc978caa059c55ce8df998 (patch)
treec5e13819f3f5f49b1ee8e4cfe848922214c5d682 /WebCore/plugins
parentd4924af12855cd19162ba1442a6055664c98ca32 (diff)
downloadexternal_webkit-fcce71fa296bf3b42bfc978caa059c55ce8df998.zip
external_webkit-fcce71fa296bf3b42bfc978caa059c55ce8df998.tar.gz
external_webkit-fcce71fa296bf3b42bfc978caa059c55ce8df998.tar.bz2
Implement the full screen WebView plugin.
Use a NoTitleBar_Fullscreen dialog to implement the full screen plugin. This runs in the same thread as WebView (UI in the Browser case). One catch is that the SurfaceView provided by the plugin needs to be opaque if it doesn't want to see through the WebView. The PluginFullScreenHolder translates the events to the underline WebView. Special treatment in the touch case as it needs to translate the coordinates. WebView can't be panned, or double tap to zoom, or long press to trigger the context menu while having a full screen plugin. Inside webkit, we also give the plugin element focus when it goes to the full screen so that it takes key events. While handling key events, we don't let it loose focus or scroll out. Todo: When a plugin goes to full screen, we should make sure the embedded plugin is fully visible. Otherwise when we translate the touch events back, they will be outside of the visible rect and will be ignored. This is part 2 of 2-project check in.
Diffstat (limited to 'WebCore/plugins')
-rw-r--r--WebCore/plugins/android/PluginViewAndroid.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp
index 4266a9a..69e0541 100644
--- a/WebCore/plugins/android/PluginViewAndroid.cpp
+++ b/WebCore/plugins/android/PluginViewAndroid.cpp
@@ -348,6 +348,10 @@ void PluginView::handleKeyboardEvent(KeyboardEvent* event)
if (m_plugin->pluginFuncs()->event(m_instance, &evt)) {
event->setDefaultHandled();
+ } else if (m_window->inFullScreen()){
+ // while in the full screen mode, always consumes the key events and
+ // keeps the document focus
+ event->setDefaultHandled();
} else {
// remove the plugin from the document's focus
m_parentFrame->document()->focusedNodeRemoved();