[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 11:18:37 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c09aecae2a1f6228f47db7d9a4bfe24441a49c89
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jul 18 21:33:58 2010 +0000

    Add NPJSObjectMap class
    https://bugs.webkit.org/show_bug.cgi?id=42524
    
    Reviewed by Sam Weinig.
    
    WebCore:
    
    Export ScriptController functions.
    
    * WebCore.exp.in:
    
    WebKit2:
    
    * WebKit2.xcodeproj/project.pbxproj:
    Add files.
    
    * WebProcess/Plugins/NPJSObjectMap.cpp: Added.
    * WebProcess/Plugins/NPJSObjectMap.h: Added.
    Add NPJSObjectMap, a map which contains NPObjects that wrap JavaScript objects.
    
    * WebProcess/Plugins/PluginView.cpp:
    (WebKit::PluginView::PluginView):
    Initialize the map.
    
    (WebKit::PluginView::~PluginView):
    Invalidate the map.
    
    (WebKit::PluginView::frame):
    Add frame getter.
    
    (WebKit::PluginView::windowScriptNPObject):
    Wrap the window object.
    
    (WebKit::PluginView::pluginElementNPObject):
    Wrap the plug-in element object.
    
    * WebProcess/Plugins/PluginView.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63631 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4c8c401..fb410d7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,16 @@
 2010-07-18  Anders Carlsson  <andersca at apple.com>
 
+        Reviewed by Sam Weinig.
+
+        Add NPJSObjectMap class
+        https://bugs.webkit.org/show_bug.cgi?id=42524
+
+        Export ScriptController functions.
+
+        * WebCore.exp.in:
+
+2010-07-18  Anders Carlsson  <andersca at apple.com>
+
         Reviewed by Dan Bernstein.
 
         Implement some NPRuntime related NPN_ functions
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 0acef22..bd1c854 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -380,8 +380,10 @@ __ZN7WebCore16NavigationActionC1Ev
 __ZN7WebCore16ScriptController10initScriptEPNS_15DOMWrapperWorldE
 __ZN7WebCore16ScriptController11createWorldEv
 __ZN7WebCore16ScriptController13executeScriptERKNS_6StringEbNS_14ShouldAllowXSSE
+__ZN7WebCore16ScriptController17canExecuteScriptsENS_33ReasonForCallingCanExecuteScriptsE
 __ZN7WebCore16ScriptController18windowScriptObjectEv
 __ZN7WebCore16ScriptController20executeScriptInWorldEPNS_15DOMWrapperWorldERKNS_6StringEbNS_14ShouldAllowXSSE
+__ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE
 __ZN7WebCore16ThreadGlobalData10staticDataE
 __ZN7WebCore16ThreadGlobalDataC1Ev
 __ZN7WebCore16ThreadGlobalDataD1Ev
@@ -1222,12 +1224,8 @@ __ZN3JSC8Bindings13RuntimeObjectD2Ev
 __ZN3JSC8Bindings8Instance19createRuntimeObjectEPNS_9ExecStateE
 __ZN3JSC8Bindings8InstanceC2EN3WTF10PassRefPtrINS0_10RootObjectEEE
 __ZN3JSC8Bindings8InstanceD2Ev
-__ZN7WebCore13IdentifierRep3getEPKc
-__ZN7WebCore13IdentifierRep3getEi
 __ZN7WebCore13IdentifierRep7isValidEPS0_
 __ZN7WebCore16ScriptController16createRootObjectEPv
-__ZN7WebCore16ScriptController17canExecuteScriptsENS_33ReasonForCallingCanExecuteScriptsE
-__ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE
 __ZNK3JSC8Bindings13RuntimeObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
 __ZTVN3JSC13RuntimeMethodE
 #endif
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 90f0fd2..eebe6ea 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,38 @@
 
         Reviewed by Sam Weinig.
 
+        Add NPJSObjectMap class
+        https://bugs.webkit.org/show_bug.cgi?id=42524
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add files.
+
+        * WebProcess/Plugins/NPJSObjectMap.cpp: Added.
+        * WebProcess/Plugins/NPJSObjectMap.h: Added.
+        Add NPJSObjectMap, a map which contains NPObjects that wrap JavaScript objects.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::PluginView):
+        Initialize the map.
+
+        (WebKit::PluginView::~PluginView):
+        Invalidate the map.
+
+        (WebKit::PluginView::frame):
+        Add frame getter.
+
+        (WebKit::PluginView::windowScriptNPObject):
+        Wrap the window object.
+
+        (WebKit::PluginView::pluginElementNPObject):
+        Wrap the plug-in element object.
+
+        * WebProcess/Plugins/PluginView.h:
+
+2010-07-18  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
         Implement more NPRuntime related NPN_ functions
         https://bugs.webkit.org/show_bug.cgi?id=42520
 
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 8212ee8..341870e 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -32,6 +32,8 @@
 		0F52667411DD4A490006D33C /* WebProcessProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F52667311DD4A490006D33C /* WebProcessProxyMac.mm */; };
 		1A10475A110A5AD500A43ECD /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */; };
 		1A1C4EC810D06099005E67E7 /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C79A100E7FC50078DEBC /* WebCore.framework */; };
+		1A2161B011F37664008AD0F5 /* NPJSObjectMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2161AE11F37664008AD0F5 /* NPJSObjectMap.h */; };
+		1A2161B111F37664008AD0F5 /* NPJSObjectMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2161AF11F37664008AD0F5 /* NPJSObjectMap.cpp */; };
 		1A2162B011F38971008AD0F5 /* NPRuntimeUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */; };
 		1A2162B111F38971008AD0F5 /* NPRuntimeUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2162AF11F38971008AD0F5 /* NPRuntimeUtilities.h */; };
 		1A30066E1110F4F70031937C /* ResponsivenessTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A30066C1110F4F70031937C /* ResponsivenessTimer.h */; };
@@ -299,6 +301,8 @@
 		0F5265BB11DD37860006D33C /* LayerBackedDrawingAreaProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LayerBackedDrawingAreaProxyMac.mm; sourceTree = "<group>"; };
 		0F52667311DD4A490006D33C /* WebProcessProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessProxyMac.mm; sourceTree = "<group>"; };
 		1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+		1A2161AE11F37664008AD0F5 /* NPJSObjectMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPJSObjectMap.h; sourceTree = "<group>"; };
+		1A2161AF11F37664008AD0F5 /* NPJSObjectMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPJSObjectMap.cpp; sourceTree = "<group>"; };
 		1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeUtilities.cpp; sourceTree = "<group>"; };
 		1A2162AF11F38971008AD0F5 /* NPRuntimeUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPRuntimeUtilities.h; sourceTree = "<group>"; };
 		1A30066C1110F4F70031937C /* ResponsivenessTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResponsivenessTimer.h; sourceTree = "<group>"; };
@@ -652,6 +656,8 @@
 				1A6FB90811E66FB100DB1371 /* Netscape */,
 				1A6FB7E511E6530500DB1371 /* DummyPlugin.cpp */,
 				1A6FB7E411E6530500DB1371 /* DummyPlugin.h */,
+				1A2161AF11F37664008AD0F5 /* NPJSObjectMap.cpp */,
+				1A2161AE11F37664008AD0F5 /* NPJSObjectMap.h */,
 				1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */,
 				1A2162AF11F38971008AD0F5 /* NPRuntimeUtilities.h */,
 				1A6FB7D011E651E200DB1371 /* Plugin.cpp */,
@@ -1240,6 +1246,7 @@
 				BC8699B7116AADAA002A925B /* WKViewInternal.h in Headers */,
 				BC2E6E8C1141971500A63B1E /* WorkItem.h in Headers */,
 				BC2E6E8E1141971500A63B1E /* WorkQueue.h in Headers */,
+				1A2161B011F37664008AD0F5 /* NPJSObjectMap.h in Headers */,
 				1A2162B111F38971008AD0F5 /* NPRuntimeUtilities.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1431,6 +1438,7 @@
 				BC8699B6116AADAA002A925B /* WKView.mm in Sources */,
 				BC2E6E8D1141971500A63B1E /* WorkQueue.cpp in Sources */,
 				BC0092F8115837A300E0AE2A /* WorkQueueMac.cpp in Sources */,
+				1A2161B111F37664008AD0F5 /* NPJSObjectMap.cpp in Sources */,
 				1A2162B011F38971008AD0F5 /* NPRuntimeUtilities.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
diff --git a/WebKit2/WebProcess/Plugins/NPJSObjectMap.cpp b/WebKit2/WebProcess/Plugins/NPJSObjectMap.cpp
new file mode 100644
index 0000000..f887eb6
--- /dev/null
+++ b/WebKit2/WebProcess/Plugins/NPJSObjectMap.cpp
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "NPJSObjectMap.h"
+
+#include "NPRuntimeUtilities.h"
+#include <JavaScriptCore/JSObject.h>
+#include <JavaScriptCore/Protect.h>
+#include <WebKit/npruntime.h>
+#include <wtf/Noncopyable.h>
+
+using namespace JSC;
+
+namespace WebKit {
+
+class NPJSObject : public NPObject, Noncopyable {
+public:
+    static NPJSObject* create(NPJSObjectMap* objectMap, JSObject* jsObject);
+
+private:
+    NPJSObject()
+        : m_objectMap(0)
+    {
+    }
+
+    ~NPJSObject()
+    {
+        // Remove ourselves from the map.
+        ASSERT(m_objectMap->m_objects.contains(m_jsObject.get()));
+        m_objectMap->m_objects.remove(m_jsObject.get());
+    }
+
+    static bool isNPJSObject(NPObject*);
+
+    static NPJSObject* toNPJSObject(NPObject* npObject)
+    {
+        ASSERT(isNPJSObject(npObject));
+        return static_cast<NPJSObject*>(npObject);
+    }
+
+    void initialize(NPJSObjectMap*, JSObject* jsObject);
+
+    static NPClass* npClass();
+    static NPObject* NP_Allocate(NPP, NPClass*);
+    static void NP_Deallocate(NPObject*);
+
+    NPJSObjectMap* m_objectMap;
+    ProtectedPtr<JSObject> m_jsObject;
+};
+
+NPJSObject* NPJSObject::create(NPJSObjectMap* objectMap, JSObject* jsObject)
+{
+    NPJSObject* npJSObject = toNPJSObject(createNPObject(0, npClass()));
+    npJSObject->initialize(objectMap, jsObject);
+
+    return npJSObject;
+}
+
+bool NPJSObject::isNPJSObject(NPObject* npObject)
+{
+    return npObject->_class == npClass();
+}
+
+void NPJSObject::initialize(NPJSObjectMap* objectMap, JSObject* jsObject)
+{
+    ASSERT(!m_objectMap);
+    ASSERT(!m_jsObject);
+
+    m_objectMap = objectMap;
+    m_jsObject = jsObject;
+}
+
+NPClass* NPJSObject::npClass()
+{
+    static NPClass npClass = {
+        NP_CLASS_STRUCT_VERSION,
+        NP_Allocate,
+        NP_Deallocate,
+        0, 
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0
+    };
+
+    return &npClass;
+}
+    
+NPObject* NPJSObject::NP_Allocate(NPP npp, NPClass* npClass)
+{
+    ASSERT_UNUSED(npp, !npp);
+
+    return new NPJSObject;
+}
+
+void NPJSObject::NP_Deallocate(NPObject* npObject)
+{
+    NPJSObject* npJSObject = toNPJSObject(npObject);
+    delete npJSObject;
+}
+
+NPJSObjectMap::NPJSObjectMap(PluginView* pluginView)
+    : m_pluginView(pluginView)
+{
+}
+
+NPObject* NPJSObjectMap::getOrCreateObject(JSObject* jsObject)
+{
+    // First, check if we already know about this object.
+    if (NPJSObject* npJSObject = m_objects.get(jsObject)) {
+        retainNPObject(npJSObject);
+        return npJSObject;
+    }
+
+    NPJSObject* npJSObject = NPJSObject::create(this, jsObject);
+    m_objects.set(jsObject, npJSObject);
+
+    return npJSObject;
+}
+
+void NPJSObjectMap::invalidate()
+{
+    Vector<NPJSObject*> npJSObjects;
+    copyValuesToVector(m_objects, npJSObjects);
+
+    // Deallocate all the object wrappers so we won't leak any JavaScript objects.
+    for (size_t i = 0; i < npJSObjects.size(); ++i)
+        deallocateNPObject(npJSObjects[i]);
+    
+    // We shouldn't have any objects left now.
+    ASSERT(m_objects.isEmpty());
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebProcess/Plugins/NPJSObjectMap.h b/WebKit2/WebProcess/Plugins/NPJSObjectMap.h
new file mode 100644
index 0000000..a823a01
--- /dev/null
+++ b/WebKit2/WebProcess/Plugins/NPJSObjectMap.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef NPJSObjectWrapperMap_h
+#define NPJSObjectWrapperMap_h
+
+#include <wtf/HashMap.h>
+
+class NPObject;
+
+namespace JSC {
+    class JSObject;
+}
+
+namespace WebKit {
+
+class NPJSObject;
+class PluginView;
+
+// A per plug-in map of NPObjects that wrap JavaScript objects.
+
+class NPJSObjectMap {
+public:
+    explicit NPJSObjectMap(PluginView*);
+
+    // Returns an NPObject that wraps the given JavaScript object. If there is already an NPObject that wraps this JSObject, it will
+    // retain it and return it.
+    NPObject* getOrCreateObject(JSC::JSObject*);
+
+    void invalidate();
+
+private:
+    friend class NPJSObject;
+    PluginView* m_pluginView;
+
+    HashMap<JSC::JSObject*, NPJSObject*> m_objects;
+};
+
+} // namespace WebKit
+
+#endif // NPJSObjectWrapperMap_h
diff --git a/WebKit2/WebProcess/Plugins/PluginView.cpp b/WebKit2/WebProcess/Plugins/PluginView.cpp
index 6f31c16..612b46f 100644
--- a/WebKit2/WebProcess/Plugins/PluginView.cpp
+++ b/WebKit2/WebProcess/Plugins/PluginView.cpp
@@ -37,6 +37,7 @@
 #include <WebCore/RenderLayer.h>
 #include <WebCore/ScrollView.h>
 
+using namespace JSC;
 using namespace WebCore;
 
 namespace WebKit {
@@ -210,6 +211,7 @@ PluginView::PluginView(WebCore::HTMLPlugInElement* pluginElement, PassRefPtr<Plu
     , m_isInitialized(false)
     , m_isWaitingUntilMediaCanStart(false)
     , m_pendingURLRequestsTimer(RunLoop::main(), this, &PluginView::pendingURLRequestsTimerFired)
+    , m_npJSObjectMap(this)
 {
 }
 
@@ -226,10 +228,18 @@ PluginView::~PluginView()
     if (m_plugin && m_isInitialized)
         m_plugin->destroy();
 
+    // Invalidate the NPObject map.
+    m_npJSObjectMap.invalidate();
+
     // Cancel all streams.
     cancelAllStreams();
 }
 
+Frame* PluginView::frame()
+{
+    return m_pluginElement->document()->frame();
+}
+
 void PluginView::initializePlugin()
 {
     if (m_isInitialized)
@@ -533,14 +543,25 @@ void PluginView::cancelStreamLoad(uint64_t streamID)
 
 NPObject* PluginView::windowScriptNPObject()
 {
-    // FIXME: Implement.
-    return 0;
+    if (!frame())
+        return 0;
+
+    // FIXME: Handle JavaScript being disabled.
+    ASSERT(frame()->script()->canExecuteScripts(NotAboutToExecuteScript));
+
+    return m_npJSObjectMap.getOrCreateObject(frame()->script()->windowShell(pluginWorld())->window());
 }
 
 NPObject* PluginView::pluginElementNPObject()
 {
-    // FIXME: Implement.
-    return 0;
+    if (!frame())
+        return 0;
+
+    // FIXME: Handle JavaScript being disabled.
+    JSObject* object = frame()->script()->jsObjectForPluginElement(m_pluginElement);
+    ASSERT(object);
+
+    return m_npJSObjectMap.getOrCreateObject(object);
 }
 
 void PluginView::didFinishLoad(WebFrame* webFrame)
diff --git a/WebKit2/WebProcess/Plugins/PluginView.h b/WebKit2/WebProcess/Plugins/PluginView.h
index f37c016..0d82c9c 100644
--- a/WebKit2/WebProcess/Plugins/PluginView.h
+++ b/WebKit2/WebProcess/Plugins/PluginView.h
@@ -26,6 +26,7 @@
 #ifndef PluginView_h
 #define PluginView_h
 
+#include "NPJSObjectMap.h"
 #include "Plugin.h"
 #include "PluginController.h"
 #include "RunLoop.h"
@@ -38,6 +39,7 @@
 // FIXME: Eventually this should move to WebCore.
 
 namespace WebCore {
+    class Frame;
     class HTMLPlugInElement;
 }
 
@@ -50,6 +52,8 @@ public:
         return adoptRef(new PluginView(pluginElement, plugin, parameters));
     }
 
+    WebCore::Frame* frame();
+
 private:
     PluginView(WebCore::HTMLPlugInElement*, PassRefPtr<Plugin>, const Plugin::Parameters& parameters);
     virtual ~PluginView();
@@ -114,6 +118,9 @@ private:
 
     // Streams that the plug-in has requested to load. 
     HashMap<uint64_t, RefPtr<Stream> > m_streams;
+
+    // NPObjects wrapping JavaScript objects.
+    NPJSObjectMap m_npJSObjectMap;
 };
 
 } // namespace WebKit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list