]> git.sesse.net Git - vlc/commitdiff
Make Mozilla plugin scriptable (e.g. so that the Javascript 'onclick'
authorAndre Pang <andrep@videolan.org>
Thu, 2 Dec 2004 16:07:24 +0000 (16:07 +0000)
committerAndre Pang <andrep@videolan.org>
Thu, 2 Dec 2004 16:07:24 +0000 (16:07 +0000)
attributes in chapter 7 of the VLC user guide actually work ;).

mozilla/vlcpeer.h

index d963e8a3e2e0d7e8a474636a561f51a108f23a72..9c6188e068ef4715ae5a5ea106cf515bd4687688 100644 (file)
@@ -32,6 +32,20 @@ public:
     NS_DECL_ISUPPORTS
     NS_DECL_VLCINTF
 
+    // These flags are used by the DOM and security systems to signal that
+    // JavaScript callers are allowed to call this object's scritable methods.
+    NS_IMETHOD GetFlags(PRUint32 *aFlags)
+    {
+        *aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT;
+        return NS_OK;
+    }
+
+    NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage)
+    {
+        *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS;
+        return NS_OK;
+    }
+
              VlcPeer();
              VlcPeer( VlcPlugin * );
     virtual ~VlcPeer();