summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-10-11 23:28:11 +0100
committerSteve Block <steveblock@google.com>2009-10-20 00:45:05 +0100
commit8667eaf175b0748a1d8783beeeecedfaa983a074 (patch)
tree7f1772eeeec4c77696ed788dc54b7ff77d40bb7e
parent8e1c14d2cd6633dac941b17af2bea9c045ee0140 (diff)
downloadexternal_webkit-8667eaf175b0748a1d8783beeeecedfaa983a074.zip
external_webkit-8667eaf175b0748a1d8783beeeecedfaa983a074.tar.gz
external_webkit-8667eaf175b0748a1d8783beeeecedfaa983a074.tar.bz2
Merge webkit.org at R49305 : PluginView::init and destructor have been moved to common code.
See http://trac.webkit.org/changeset/47966 and http://trac.webkit.org/changeset/47967 Change-Id: If5b9594b032d5a7d456fe3bb6092eafef3655c34
-rw-r--r--WebCore/plugins/PluginView.cpp5
-rw-r--r--WebCore/plugins/android/PluginViewAndroid.cpp50
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))