diff options
| author | Feng Qian <fqian@google.com> | 2009-05-01 00:44:46 -0700 |
|---|---|---|
| committer | Feng Qian <fqian@google.com> | 2009-05-01 01:01:53 -0700 |
| commit | 2578c44913d80005b8a079eec758531a35055272 (patch) | |
| tree | 46802156d9e4a58f984467fe3edbba7e630b6e7e /V8Binding/v8 | |
| parent | b2318f335c407832166c7568f3e50afedad5b9db (diff) | |
| download | external_webkit-2578c44913d80005b8a079eec758531a35055272.zip external_webkit-2578c44913d80005b8a079eec758531a35055272.tar.gz external_webkit-2578c44913d80005b8a079eec758531a35055272.tar.bz2 | |
Add plugin plumbing with V8 binding.
Hook up plugin with V8 binding. You can take the patch and play on your local
machine. It is almost there, I need do more testing.
Diffstat (limited to 'V8Binding/v8')
| -rw-r--r-- | V8Binding/v8/ScriptController.cpp | 11 | ||||
| -rw-r--r-- | V8Binding/v8/npruntime.cpp | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/V8Binding/v8/ScriptController.cpp b/V8Binding/v8/ScriptController.cpp index 83dc52c..e53606e 100644 --- a/V8Binding/v8/ScriptController.cpp +++ b/V8Binding/v8/ScriptController.cpp @@ -46,6 +46,7 @@ #include "npruntime_priv.h" #include "NPV8Object.h" #include "ScriptSourceCode.h" +#include "PluginView.h" #include "Widget.h" #include "v8_proxy.h" @@ -312,13 +313,17 @@ PassScriptInstance ScriptController::createScriptInstanceForWidget(Widget* widge { ASSERT(widget != 0); +#if PLATFORM(CHROMIUM) if (widget->isFrameView()) return 0; -#if PLATFORM(CHROMIUM) NPObject* npObject = ChromiumBridge::pluginScriptableObject(widget); -#else - NPObject* npObject = 0; // TODO(fqian): fix this +#elif PLATFORM(ANDROID) + if (!widget->isPluginView()) + return 0; + + PluginView* pluginView = static_cast<PluginView*>(widget); + NPObject* npObject = pluginView->getNPObject(); #endif if (!npObject) return 0; diff --git a/V8Binding/v8/npruntime.cpp b/V8Binding/v8/npruntime.cpp index 677c571..143a570 100644 --- a/V8Binding/v8/npruntime.cpp +++ b/V8Binding/v8/npruntime.cpp @@ -411,9 +411,8 @@ void _NPN_UnregisterObject(NPObject* obj) { list->remove(obj); } } - ForgetV8ObjectForNPObject(obj); - g_live_objects.remove(obj); + ForgetV8ObjectForNPObject(obj); } bool _NPN_IsAlive(NPObject* obj) { |
