diff options
author | Grace Kloba <klobag@google.com> | 2010-01-19 14:01:54 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-01-19 14:01:54 -0800 |
commit | 2ba2794f78c094c88827bafc31f42afefe710d1e (patch) | |
tree | 1761e65f95532fba52390588a1e3478348e58150 | |
parent | f83060e89e8ba30d0321f33164a0c4819f837a03 (diff) | |
parent | 4d667d7fc4db50148a046f6913a0db1f0f4cbba5 (diff) | |
download | external_webkit-2ba2794f78c094c88827bafc31f42afefe710d1e.zip external_webkit-2ba2794f78c094c88827bafc31f42afefe710d1e.tar.gz external_webkit-2ba2794f78c094c88827bafc31f42afefe710d1e.tar.bz2 |
am 4d667d7f: Exit the fullscreen mode when the PluginWidget is destroyed.
Merge commit '4d667d7fc4db50148a046f6913a0db1f0f4cbba5' into eclair-mr2-plus-aosp
* commit '4d667d7fc4db50148a046f6913a0db1f0f4cbba5':
Exit the fullscreen mode when the PluginWidget is
-rw-r--r-- | WebKit/android/plugins/PluginWidgetAndroid.cpp | 9 | ||||
-rw-r--r-- | WebKit/android/plugins/PluginWidgetAndroid.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/WebKit/android/plugins/PluginWidgetAndroid.cpp b/WebKit/android/plugins/PluginWidgetAndroid.cpp index 113a3bc..0fcdc3b 100644 --- a/WebKit/android/plugins/PluginWidgetAndroid.cpp +++ b/WebKit/android/plugins/PluginWidgetAndroid.cpp @@ -56,12 +56,16 @@ PluginWidgetAndroid::PluginWidgetAndroid(WebCore::PluginView* view) m_visible = true; m_zoomLevel = 0; m_embeddedView = NULL; + m_acceptEvents = false; } PluginWidgetAndroid::~PluginWidgetAndroid() { + m_acceptEvents = false; if (m_core) { m_core->removePlugin(this); - if (m_embeddedView) { + if (m_isFullScreen) { + exitFullScreen(true); + } else if (m_embeddedView) { m_core->destroySurface(m_embeddedView); } } @@ -78,6 +82,7 @@ PluginWidgetAndroid::~PluginWidgetAndroid() { void PluginWidgetAndroid::init(android::WebViewCore* core) { m_core = core; m_core->addPlugin(this); + m_acceptEvents = true; } static SkBitmap::Config computeConfig(bool isTransparent) { @@ -223,6 +228,8 @@ void PluginWidgetAndroid::draw(SkCanvas* canvas) { } bool PluginWidgetAndroid::sendEvent(const ANPEvent& evt) { + if (!m_acceptEvents) + return false; WebCore::PluginPackage* pkg = m_pluginView->plugin(); NPP instance = m_pluginView->instance(); // "missing" plugins won't have these diff --git a/WebKit/android/plugins/PluginWidgetAndroid.h b/WebKit/android/plugins/PluginWidgetAndroid.h index 93ad4a8..eba0b69 100644 --- a/WebKit/android/plugins/PluginWidgetAndroid.h +++ b/WebKit/android/plugins/PluginWidgetAndroid.h @@ -159,6 +159,7 @@ private: bool m_visible; float m_zoomLevel; jobject m_embeddedView; + bool m_acceptEvents; /* We limit the number of rectangles to minimize storage and ensure adequate speed. |