diff options
| -rw-r--r-- | WebCore/plugins/PluginView.cpp | 5 | ||||
| -rw-r--r-- | WebCore/plugins/android/PluginViewAndroid.cpp | 50 |
2 files changed, 10 insertions, 45 deletions
diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp index 976e3ea..c066e25 100644 --- a/WebCore/plugins/PluginView.cpp +++ b/WebCore/plugins/PluginView.cpp @@ -290,7 +290,12 @@ PluginView::~PluginView() m_parentFrame->script()->cleanupScriptObjectsForPlugin(this); +#if PLATFORM(ANDROID) + // Since we have no legacy plugins to check, we ignore the quirks check. + if (m_plugin) +#else if (m_plugin && !(m_plugin->quirks().contains(PluginQuirkDontUnloadPlugin))) +#endif m_plugin->unload(); } diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp index 7d10993..a8bc319 100644 --- a/WebCore/plugins/android/PluginViewAndroid.cpp +++ b/WebCore/plugins/android/PluginViewAndroid.cpp @@ -163,58 +163,18 @@ void PluginView::platformInit() m_npWindow.window = 0; } -void PluginView::platformStart() +bool PluginView::platformStart() { - notImplemented(); + android::WebViewCore* c = android::WebViewCore::getWebViewCore(this->parent()); + m_window->init(c); + return true; } -PluginView::~PluginView() +void PluginView::platformDestroy() { - stop(); - - deleteAllValues(m_requests); - - freeStringArray(m_paramNames, m_paramCount); - freeStringArray(m_paramValues, m_paramCount); - - m_parentFrame->script()->cleanupScriptObjectsForPlugin(this); - -// Since we have no legacy plugins to check, we ignore the quirks check -// if (m_plugin && !m_plugin->quirks().contains(PluginQuirkDontUnloadPlugin)) - if (m_plugin) { - m_plugin->unload(); - } delete m_window; } -void PluginView::init() -{ - if (m_haveInitialized) - return; - m_haveInitialized = true; - - android::WebViewCore* c = android::WebViewCore::getWebViewCore(this->parent()); - m_window->init(c); - - if (!m_plugin) { - ASSERT(m_status == PluginStatusCanNotFindPlugin); - return; - } - - if (!m_plugin->load()) { - m_plugin = 0; - m_status = PluginStatusCanNotLoadPlugin; - return; - } - - if (!start()) { - m_status = PluginStatusCanNotLoadPlugin; - return; - } - - m_status = PluginStatusLoadedSuccessfully; -} - void PluginView::handleTouchEvent(TouchEvent* event) { if (!m_window->isAcceptingEvent(kTouch_ANPEventFlag)) |
