summaryrefslogtreecommitdiffstats
path: root/WebCore/plugins/android
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2009-11-09 14:41:06 -0500
committerDerek Sollenberger <djsollen@google.com>2009-11-09 15:33:35 -0500
commitf2a6f2e2f867d06fd84e859cdc37c3293357a6ff (patch)
treee4b0462ee7324be66c7df1419e060c16ff8dd805 /WebCore/plugins/android
parentde2098fbe71502df93eb3228ceaabd698aef0542 (diff)
downloadexternal_webkit-f2a6f2e2f867d06fd84e859cdc37c3293357a6ff.zip
external_webkit-f2a6f2e2f867d06fd84e859cdc37c3293357a6ff.tar.gz
external_webkit-f2a6f2e2f867d06fd84e859cdc37c3293357a6ff.tar.bz2
Allow plugins to load java classes from their apk.
Relocate ANPSystemInterface into its own file and provide the ability to call into java and load a plugin's java class from their apk. see http://b/2215696
Diffstat (limited to 'WebCore/plugins/android')
-rw-r--r--WebCore/plugins/android/PluginViewAndroid.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp
index 529458b..69f76b8 100644
--- a/WebCore/plugins/android/PluginViewAndroid.cpp
+++ b/WebCore/plugins/android/PluginViewAndroid.cpp
@@ -75,6 +75,7 @@
#include "android_npapi.h"
#include "ANPSurface_npapi.h"
+#include "ANPSystem_npapi.h"
#include "SkANP.h"
#include "SkFlipPixelRef.h"
@@ -165,8 +166,6 @@ void PluginView::platformInit()
bool PluginView::platformStart()
{
- android::WebViewCore* c = android::WebViewCore::getWebViewCore(this->parent());
- m_window->init(c);
return true;
}
@@ -362,8 +361,15 @@ void PluginView::setParent(ScrollView* parent)
{
Widget::setParent(parent);
- if (parent)
+ if (parent) {
+ // the widget needs initialized now so that the plugin has access to
+ // WebViewCore when NPP_New is called
+ if (m_window && !m_window->webViewCore()) {
+ android::WebViewCore* c = android::WebViewCore::getWebViewCore(this->parent());
+ m_window->init(c);
+ }
init();
+ }
}
void PluginView::setNPWindowRect(const IntRect& rect)