[totem] Remove the "Complex" (Real Media compatible) browser plugin



commit 3353323b0c79dbdfe5ef3ca5f71037188dae9c13
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Nov 20 13:57:01 2009 +0000

    Remove the "Complex" (Real Media compatible) browser plugin
    
    Because it was broken, and nobody in their right minds still
    use Real stuff. Desperate people can probably use the HelixPlayer,
    though it won't play anything interesting.

 browser-plugin/Makefile.am                 |   60 -----
 browser-plugin/README.browser-plugin       |   14 --
 browser-plugin/TODO                        |    6 -
 browser-plugin/idl/totemIComplexPlayer.idl |  193 ----------------
 browser-plugin/totem-plugin-viewer.c       |   48 +----
 browser-plugin/totemComplexPlugin.cpp      |  315 -------------------------
 browser-plugin/totemComplexPlugin.h        |  165 -------------
 browser-plugin/totemPlugin.cpp             |  346 ----------------------------
 browser-plugin/totemPlugin.h               |   27 ---
 configure.in                               |   12 -
 10 files changed, 7 insertions(+), 1179 deletions(-)
---
diff --git a/browser-plugin/Makefile.am b/browser-plugin/Makefile.am
index b3a24e0..9a189a5 100644
--- a/browser-plugin/Makefile.am
+++ b/browser-plugin/Makefile.am
@@ -195,66 +195,6 @@ libtotem_gmp_plugin_la_LDFLAGS = \
 
 endif
 
-# Totem Complex Plugin
-
-if ENABLE_COMPLEX_PLUGIN
-
-plugin_LTLIBRARIES += libtotem-complex-plugin.la
-
-libtotem_complex_plugin_la_SOURCES =	\
-	npapi.h				\
-	npruntime.h			\
-	npupp.h				\
-	totemNPNGlue.cpp		\
-	totemNPClass.cpp		\
-	totemNPClass.h			\
-	totemNPObject.cpp		\
-	totemNPObject.h			\
-	totemNPObjectWrapper.h		\
-	totemNPVariantWrapper.h		\
-	totemPluginGlue.cpp		\
-	totemPlugin.cpp			\
-	totemPlugin.h			\
-	totemComplexPlugin.cpp		\
-	totemComplexPlugin.h		\
-	totem-plugin-viewer-constants.h
-
-libtotem_complex_plugin_la_CPPFLAGS = \
-	-I$(top_srcdir)/src				\
-	-I$(top_srcdir)/src/backend			\
-	-I$(top_builddir)/src				\
-	-I$(top_builddir)/src/backend			\
-	-DXP_UNIX					\
-	-DMOZ_X11					\
-	-DTOTEM_COMPLEX_PLUGIN				\
-	-DTOTEM_PL_PARSER_MINI				\
-	-D_REENTRANT					\
-	-DDBUS_API_SUBJECT_TO_CHANGE			\
-	-DSYSCONFDIR="\"$(sysconfdir)\""		\
-	-DLIBEXECDIR="\"$(libexecdir)\""		\
-	$(DISABLE_DEPRECATED)				\
-	$(AM_CPPFLAGS)
-
-libtotem_complex_plugin_la_CXXFLAGS = \
-	$(BROWSER_PLUGIN_CFLAGS)	\
-	$(DBUS_CFLAGS)			\
-	$(WARN_CXXFLAGS)		\
-	$(PLUGIN_EXTRA_WARN_CXXFLAGS)	\
-	$(AM_CXXFLAGS)
-
-libtotem_complex_plugin_la_LIBADD = \
-	libtotembrowserplugin_helper.la	\
-	$(DBUS_LIBS)			\
-	$(BROWSER_PLUGIN_LIBS)
-
-libtotem_complex_plugin_la_LDFLAGS = \
-	-avoid-version	\
-	-export-symbols $(srcdir)/plugin.symbols \
-	-module		\
-	$(AM_LDFLAGS)
-
-endif
-
 # Totem NarrowSpace Plugin
 
 if ENABLE_NARROWSPACE_PLUGIN
diff --git a/browser-plugin/README.browser-plugin b/browser-plugin/README.browser-plugin
index 5bb3dd8..5548914 100644
--- a/browser-plugin/README.browser-plugin
+++ b/browser-plugin/README.browser-plugin
@@ -40,20 +40,6 @@ setting. Bear in mind that Firefox/Seamonkey might not re-read the plugin list
 once it's been cached. You might have to remove the pluginreg.dat from the Mozilla
 profile directory.
 
-Special topics: Complex plugin
-==============================
-
-The complex plugin supports multiple plugins working together, see
-[http://service.real.com/help/library/guides/realone/ProductionGuide/HTML/realpgd.htm?page=htmfiles/embed.htm].
-
-To implement this, we maintain a list of totem complex plugins.
-The plugins are partitioned into classes by their 'console' name; and a
-random plugin (well, the first one instantiated) is chosen as representant.
-This one owns the plugin viewer and all viewer interaction of the linked plugins
-are done trough it. When this plugin is destroyed, we search for a new
-representant, transfer the viewer ownership to it and update the representant
-pointer in all of the classes' plugins.
-
 Special topics: NarrowSpace plugin
 ==================================
 
diff --git a/browser-plugin/TODO b/browser-plugin/TODO
index 2f35985..797a3f1 100644
--- a/browser-plugin/TODO
+++ b/browser-plugin/TODO
@@ -12,9 +12,3 @@ Plugin:
 - invert DBUS-OpenStream/NPN_GetURL order: this is necessary so we can push the real stream URI
   to the viewer (for use as base uri for redirects)
 
-Complex plugin:
-- write IDL file (nsIHXPlayer.idl available, but incompatible with totem's
-  licence exception; is the exception needed for the *plugin* itself?)
-- implement the various 'controls' types in the viewer
-- in the viewer, cope with the 'main' window being removed? (maybe reparent to a hidden window)
-
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 69b52cb..1da63fa 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -76,7 +76,6 @@ char * totem_pl_parser_resolve_uri (GFile *base_gfile, const char *relative_uri)
 
 typedef enum {
 	TOTEM_PLUGIN_TYPE_GMP,
-	TOTEM_PLUGIN_TYPE_COMPLEX,
 	TOTEM_PLUGIN_TYPE_NARROWSPACE,
 	TOTEM_PLUGIN_TYPE_MULLY,
 	TOTEM_PLUGIN_TYPE_CONE,
@@ -1972,29 +1971,6 @@ totem_embedded_construct (TotemEmbedded *emb,
 }
 
 static gboolean
-totem_embedded_construct_placeholder (TotemEmbedded *emb,
-			  GdkNativeWindow xid,
-			  int width,
-			  int height)
-{
-	GtkWidget *window, *label;
-
-	if (xid == 0)
-		return TRUE;
-
-	window = gtk_plug_new (xid);
-	/* FIXME why? */
-	gtk_widget_realize (window);
-
-	label = gtk_label_new ("Not yet supported");
-	gtk_container_add (GTK_CONTAINER (window), label);
-
-	gtk_widget_show_all (window);
-
-	return TRUE;
-}
-
-static gboolean
 totem_embedded_set_window (TotemEmbedded *embedded,
 			   const char *controls,
 			   guint window,
@@ -2004,22 +1980,13 @@ totem_embedded_set_window (TotemEmbedded *embedded,
 {
 	g_print ("Viewer: SetWindow XID %u size %d:%d\n", window, width, height);
 
-	if (embedded->type == TOTEM_PLUGIN_TYPE_COMPLEX) {
-		/* FIXME!!! */
-		if (strcmp (controls, "All") != 0 &&
-		    strcmp (controls, "ImageWindow") != 0) {
-			totem_embedded_construct_placeholder (embedded, (GdkNativeWindow) window, width, height);
-			return TRUE;
-		}
-	} else {
-		if (strcmp (controls, "All") != 0 &&
-		    strcmp (controls, "ImageWindow") != 0) {
-			g_set_error (error,
-				TOTEM_EMBEDDED_ERROR_QUARK,
-				TOTEM_EMBEDDED_SETWINDOW_UNSUPPORTED_CONTROLS,
-				"Unsupported controls '%s'", controls);
-			return FALSE;
-		}
+	if (strcmp (controls, "All") != 0 &&
+	    strcmp (controls, "ImageWindow") != 0) {
+		g_set_error (error,
+			     TOTEM_EMBEDDED_ERROR_QUARK,
+			     TOTEM_EMBEDDED_SETWINDOW_UNSUPPORTED_CONTROLS,
+			     "Unsupported controls '%s'", controls);
+		return FALSE;
 	}
 
 	if (embedded->window != NULL) {
@@ -2188,7 +2155,6 @@ parse_plugin_type (const gchar *option_name,
 {
 	const char types[TOTEM_PLUGIN_TYPE_LAST][12] = {
 		"gmp",
-		"complex",
 		"narrowspace",
 		"mully",
 		"cone"
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 4e7d999..d40e14e 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -64,8 +64,6 @@
 #include "totemGMPNetwork.h"
 #include "totemGMPPlayer.h"
 #include "totemGMPSettings.h"
-#elif defined(TOTEM_COMPLEX_PLUGIN)
-#include "totemComplexPlugin.h"
 #elif defined(TOTEM_NARROWSPACE_PLUGIN)
 #include "totemNarrowSpacePlugin.h"
 #elif defined(TOTEM_MULLY_PLUGIN)
@@ -101,8 +99,6 @@ static const totemPluginMimeEntry kMimeTypes[] = {
   { "application/x-ms-wmp", "wmp", "video/x-ms-wmv" },
   { "application/asx", "asx", "audio/x-ms-asx" },
   { "audio/x-ms-wma", "wma", NULL }
-#elif defined(TOTEM_COMPLEX_PLUGIN)
-  { "audio/x-pn-realaudio-plugin", "rpm", "audio/vnd.rn-realaudio" },
 #elif defined(TOTEM_NARROWSPACE_PLUGIN)
   { "video/quicktime", "mov", NULL },
   { "video/mp4", "mp4", NULL },
@@ -140,8 +136,6 @@ static const totemPluginMimeEntry kMimeTypes[] = {
 static const char kPluginDescription[] =
 #if defined(TOTEM_GMP_PLUGIN)
   "Windows Media Player Plug-in 10 (compatible; Totem)";
-#elif defined(TOTEM_COMPLEX_PLUGIN)
-  "Helix DNA Plugin: RealPlayer G2 Plug-In Compatible (compatible; Totem)";
 #elif defined(TOTEM_NARROWSPACE_PLUGIN)
   "QuickTime Plug-in " TOTEM_NARROWSPACE_VERSION;
 #elif defined(TOTEM_MULLY_PLUGIN)
@@ -168,34 +162,6 @@ static const char kPluginUserAgent[] =
   "";
 #endif
 
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-nsTArray<totemPlugin*> *totemPlugin::sPlugins;
-
-/* Keep the same order as totemPlugin::Control enum! */
-static const char *kControl[] = {
-	"All",
-	"ControlPanel",
-	"FFCtrl",
-	"HomeCtrl",
-	"ImageWindow",
-	"InfoPanel",
-	"InfoVolumePanel",
-	"MuteCtrl",
-	"MuteVolume",
-	"PauseButton",
-	"PlayButton",
-	"PlayOnlyButton",
-	"PositionField",
-	"PositionSlider",
-	"RWCtrl",
-	"StatusBar",
-	"StatusField",
-	"StopButton",
-	"TACCtrl",
-	"VolumeSlider",
-};
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
 void*
 totemPlugin::operator new (size_t aSize) throw ()
 {
@@ -220,35 +186,15 @@ totemPlugin::totemPlugin (NPP aNPP)
 	mViewerFD (-1),
 	mWidth (-1),
 	mHeight (-1),
-#ifdef TOTEM_COMPLEX_PLUGIN
-	mAutoPlay (false),
-#else
 	mAutoPlay (true),
-#endif /* TOTEM_NARROWSPACE_PLUGIN */
 	mNeedViewer (true),
 	mState (TOTEM_STATE_STOPPED)
 {
         TOTEM_LOG_CTOR ();
-
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-	/* Add |this| to the global plugins list */
-	assert (sPlugins->IndexOf (this) == NoIndex); //, "WTF?");
-	if (!sPlugins->AppendElement (this)) {
-		D ("Couldn't maintain plugin list!");
-	}
-#endif /* TOTEM_COMPLEX_PLUGIN */
 }
 
 totemPlugin::~totemPlugin ()
 {
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-	/* Remove us from the plugins list */
-	NS_ASSERTION (sPlugins->IndexOf (this) != NoIndex, "WTF?");
-	sPlugins->RemoveElement (this);
-
-	TransferConsole ();
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
         /* FIXMEchpe invalidate the scriptable object, or is that done automatically? */
 
 	if (mBusProxy) {
@@ -491,12 +437,6 @@ totemPlugin::Rate () const
 NPError
 totemPlugin::ViewerFork ()
 {
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-	/* Don't fork a viewer if we're going to use another one */
-	if (!mNeedViewer)
-		return NPERR_NO_ERROR;
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
 	const char *userAgent = kPluginUserAgent;
 
 	if (*kPluginUserAgent == '\0') {
@@ -540,8 +480,6 @@ totemPlugin::ViewerFork ()
 	g_ptr_array_add (arr, g_strdup (DASHES TOTEM_OPTION_PLUGIN_TYPE));
 #if defined(TOTEM_GMP_PLUGIN)
 	g_ptr_array_add (arr, g_strdup ("gmp"));
-#elif defined(TOTEM_COMPLEX_PLUGIN)
-	g_ptr_array_add (arr, g_strdup ("complex"));
 #elif defined(TOTEM_NARROWSPACE_PLUGIN)
 	g_ptr_array_add (arr, g_strdup ("narrowspace"));
 #elif defined(TOTEM_MULLY_PLUGIN)
@@ -735,17 +673,6 @@ totemPlugin::ViewerSetup ()
 	} else {
 		ViewerSetWindow ();
 	}
-
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-	/* Notify all consoles */
-	uint32_t count = sPlugins->Length ();
-	for (uint32_t i = 0; i < count; ++i) {
-		totemPlugin *plugin = sPlugins->ElementAt (i);
-
-		if (plugin->mConsoleClassRepresentant == this)
-			plugin->UnownedViewerSetup ();
-	}
-#endif /* TOTEM_COMPLEX_PLUGIN */
 }
 
 
@@ -825,11 +752,7 @@ totemPlugin::ViewerSetWindow ()
 					 ViewerSetWindowCallback,
 					 reinterpret_cast<void*>(this),
 					 NULL,
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-					 G_TYPE_STRING, mControls.get (),
-#else
 					 G_TYPE_STRING, "All",
-#endif
 					 G_TYPE_UINT, (guint) mWindow,
 					 G_TYPE_INT, mWidth,
 					 G_TYPE_INT, mHeight,
@@ -1719,201 +1642,6 @@ totemPlugin::ParseURLExtensions (const char* str,
 
 #endif /* TOTEM_NARROWSPACE_PLUGIN */
 
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-
-totemPlugin *
-totemPlugin::FindConsoleClassRepresentant ()
-{
-	/* FIXME: this treats "master" incorrectly */
-	if (!mSrcURI ||
-	    mConsole.IsEmpty () ||
-	    mConsole.Equals (NS_LITERAL_CSTRING ("_unique")) ||
-	    mConsole.Equals (NS_LITERAL_CSTRING ("_master"))) {
-		D ("We're the representant for the console class");
-		return NULL;
-	}
-
-	totemPlugin *representant = NULL;
-
-	/* Try to find a the representant of the console class */
-	uint32_t count = sPlugins->Length ();
-	for (uint32_t i = 0; i < count; ++i) {
-		totemPlugin *plugin = sPlugins->ElementAt (i);
-
-		bool equal = false;
-		/* FIXME: is this correct? Maybe we should use the toplevel document
-		 * to allow frames (and check the frames for same-origin, obviously) ?
-		 */
-		if (plugin != this &&
-		    plugin->mPluginOwnerDocument == mPluginOwnerDocument &&
-		    mConsole.Equals (plugin->mConsole) &&
-		    plugin->mSrcURI &&
-		    NS_SUCCEEDED (plugin->mSrcURI->Equals (mSrcURI, &equal)) &&
-		    equal) {
-			if (plugin->mConsoleClassRepresentant) {
-				representant = plugin->mConsoleClassRepresentant;
-			} else {
-				representant = plugin;
-			}
-			break;
-		}
-	}
-
-	D ("Representant for the console class is %p", (void*) representant);
-
-	return representant;
-}
-
-bool
-totemPlugin::SetConsole (const char * aConsole)
-{
-	/* Can't change console group */
-	if (mConsole) {
-// 		return NS_ERROR_ALREADY_INITIALIZED;
-          // FIXMEchpe set exception
-          return false;
-        }
-
-	/* FIXME: we might allow this, and kill the viewer instead.
-	 * Or maybe not spawn the viewer if we don't have a console yet?
-	 */
-	if (mViewerPID)
-		return false; // FIXMEchpe throw exception
-
-        mConsole = g_strdup (aConsole);
-
-// 	assert (mConsoleClassRepresentant == NULL, "Already have a representant");
-
-	mConsoleClassRepresentant = FindConsoleClassRepresentant ();
-	mNeedViewer = (NULL == mConsoleClassRepresentant);
-
-	return true;
-}
-
-void
-totemPlugin::TransferConsole ()
-{
-	/* Find replacement representant */
-	totemPlugin *representant = NULL;
-
-	uint32_t i, count = sPlugins->Length ();
-	for (i = 0; i < count; ++i) {
-		totemPlugin *plugin = sPlugins->ElementAt (i);
-
-		if (plugin->mConsoleClassRepresentant == this) {
-			representant = plugin;
-			break;
-		}
-	}
-
-	/* If there are no other elements in this console class, there's nothing to do */
-	if (!representant)
-		return;
-
-	D ("Transferring console from %p to %p", (void*) this, (void*) representant);
-
-	/* Store new representant in the plugins */
-	representant->mConsoleClassRepresentant = NULL;
-	/* We can start at i since we got out when we found the first one in the loop above */
-	for ( ; i < count; ++i) {
-		totemPlugin *plugin = sPlugins->ElementAt (i);
-
-		if (plugin->mConsoleClassRepresentant == this)
-			plugin->mConsoleClassRepresentant = representant;
-	}
-
-	/* Now transfer viewer ownership */
-#if 0
-	if (mScriptable) {
-		assert (!representant->mScriptable, "WTF");
-		representant->mScriptable = mScriptable;
-		mScriptable->SetPlugin (representant);
-		mScriptable = NULL;
-	}
-#endif
-
-	representant->mNeedViewer = true;
-
-	representant->mViewerPID = mViewerPID;
-	mViewerPID = 0;
-
-	representant->mViewerFD = mViewerFD;
-	mViewerFD = -1;
-
-	representant->mViewerBusAddress = g_strdup (mViewerBusAddress);
-	representant->mViewerServiceName = g_strdup (mViewerServiceName);
-
-	/* FIXME correct condition? */
-	if (mViewerSetUp)
-		representant->ViewerSetup ();
-}
-
-void
-totemPlugin::UnownedViewerSetup ()
-{
-	/* already set up */
-	if (mUnownedViewerSetUp)
-		return;
-
-	mUnownedViewerSetUp = true;
-
-	D ("UnownedViewerSetup");
-
-	assert (mConsoleClassRepresentant); /* We own the viewer!? */
-
-	UnownedViewerSetWindow ();
-}
-
-void
-totemPlugin::UnownedViewerSetWindow ()
-{
-	if (mWindowSet || mWindow == 0)
-		return;
-
-	if (!mUnownedViewerSetUp) {
-		D ("No unowned viewer yet, deferring SetWindow");
-		return;
-	}
-
-	assert (mConsoleClassRepresentant); /* We own the viewer! */
-
-	assert (mConsoleClassRepresentant->mViewerProxy);
-
-	/* FIXME: do we need a reply callback? */
-	dbus_g_proxy_call_no_reply (mConsoleClassRepresentant->mViewerProxy,
-				    "SetWindow",
-				    G_TYPE_STRING, mControls.get (),
-				    G_TYPE_UINT, (guint) mWindow,
-				    G_TYPE_INT, mWidth,
-				    G_TYPE_INT, mHeight,
-				    G_TYPE_INVALID);
-
-	mWindowSet = true;
-}
-
-void
-totemPlugin::UnownedViewerUnsetWindow ()
-{
-	if (!mWindowSet || mWindow == 0)
-		return;
-
-	if (!mUnownedViewerSetUp)
-		return;
-
-	assert (mConsoleClassRepresentant); /* We own the viewer! */
-
-	assert (mConsoleClassRepresentant->mViewerProxy);
-
-	dbus_g_proxy_call_no_reply (mConsoleClassRepresentant->mViewerProxy,
-				    "UnsetWindow",
-				    G_TYPE_UINT, (guint) mWindow,
-				    G_TYPE_INVALID);
-
-	mWindowSet = false;
-}
-
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
 /* Plugin glue functions */
 
 NPError
@@ -1941,18 +1669,6 @@ totemPlugin::Init (NPMIMEType mimetype,
 		return NPERR_GENERIC_ERROR;
 	}
 
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-        /* FIXMEchpe untested; test this! */
-        if (!NPN_GetProperty (mNPP,
-                              mPluginElement,
-                              NPN_GetStringIdentifier ("ownerDocument"),
-                              getter_Retains (mPluginOwnerDocument)) ||
-            mPluginOwnerDocument.IsNull ()) {
-		Dm ("Failed to get the plugin element's ownerDocument");
-		return NPERR_GENERIC_ERROR;
-	}
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
         /* FIXMEchpe: should use totemNPObjectWrapper + getter_Retains(),
          * but that causes a crash somehow, deep inside libxul...
          */
@@ -2202,43 +1918,6 @@ totemPlugin::Init (NPMIMEType mimetype,
 		mControllerHidden = true;
 #endif
 
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-	value = (const char *) g_hash_table_lookup (args, "console");
-	if (value) {
-		rv = SetConsole (nsDependentCString (value));
-		if (NS_FAILED (rv))
-			return NPERR_GENERIC_ERROR;
-	}
-
-	const char *kControls[] = {
-		"All",
-		"ControlPanel",
-		"FFCtrl",
-		"HomeCtrl",
-		"ImageWindow",
-		"InfoPanel",
-		"InfoVolumePanel",
-		"MuteCtrl",
-		"MuteVolume",
-		"PauseButton",
-		"PlayButton",
-		"PlayOnlyButton",
-		"PositionField",
-		"PositionSlider",
-		"RWCtrl",
-		"StatusBar",
-		"StatusField",
-		"StopButton",
-		"TACCtrl",
-		"VolumeSlider",
-	};
-	uint32_t control = GetEnumIndex (args, "controls",
-				         kControls, G_N_ELEMENTS (kControls),
-					 0);
-	mControls = kControls[control];
-
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
 #ifdef TOTEM_GMP_PLUGIN
 	/* uimode is either invisible, none, mini, or full
 	 * http://windowssdk.msdn.microsoft.com/en-us/library/aa392439(VS.80).aspx */
@@ -2305,10 +1984,6 @@ totemPlugin::Init (NPMIMEType mimetype,
 	D ("mHref: %s", mHref ? mHref : "");
 	D ("mTarget: %s", mTarget ? mTarget : "");
 #endif /* TOTEM_NARROWSPACE_PLUGIN */
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-	D ("mConsole: %s", mConsole.get ());
-	D ("mControls: %s", mControls.get ());
-#endif /* TOTEM_COMPLEX_PLUGIN */
 
 	g_hash_table_destroy (args);
 
@@ -2704,8 +2379,6 @@ totemPlugin::GetNPObject (ObjectEnum which)
     case eLastNPObject:
       g_assert_not_reached ();
   }
-#elif defined(TOTEM_COMPLEX_PLUGIN)
-  npclass = totemComplexPluginNPClass::Instance();
 #elif defined(TOTEM_NARROWSPACE_PLUGIN)
   npclass = totemNarrowSpacePlayerNPClass::Instance();
 #elif defined(TOTEM_MULLY_PLUGIN)
@@ -2767,36 +2440,17 @@ totemPlugin::GetScriptableNPObject (void *_retval)
 /* static */ NPError
 totemPlugin::Initialise ()
 {
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-	sPlugins = new nsTArray<totemPlugin*> (32);
-	if (!sPlugins)
-		return NPERR_OUT_OF_MEMORY_ERROR;
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
 	return NPERR_NO_ERROR;
 }
 
 /* static */ NPError
 totemPlugin::Shutdown ()
 {
-#if defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-	if (sPlugins) {
-		if (!sPlugins->IsEmpty ()) {
-			D ("WARNING: sPlugins not empty on shutdown, count: %d", sPlugins->Length ());
-		}
-
-		delete sPlugins;
-		sPlugins = NULL;
-	}
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
 #if defined(TOTEM_GMP_PLUGIN)
         totemGMPPlayerNPClass::Shutdown ();
         totemGMPControlsNPClass::Shutdown ();
         totemGMPNetworkNPClass::Shutdown ();
         totemGMPSettingsNPClass::Shutdown ();
-#elif defined(TOTEM_COMPLEX_PLUGIN)
-	totemComplexPluginNPClass::Shutdown ();
 #elif defined(TOTEM_NARROWSPACE_PLUGIN)
         totemNarrowSpacePlayerNPClass::Shutdown ();
 #elif defined(TOTEM_MULLY_PLUGIN)
diff --git a/browser-plugin/totemPlugin.h b/browser-plugin/totemPlugin.h
index e642946..e70ee11 100644
--- a/browser-plugin/totemPlugin.h
+++ b/browser-plugin/totemPlugin.h
@@ -35,7 +35,6 @@
 
 #include "totem-plugin-viewer-constants.h"
 
-#define TOTEM_COMPLEX_VERSION_BUILD "10.0"
 #define TOTEM_NARROWSPACE_VERSION   "7.2.0"
 #define TOTEM_MULLY_VERSION         "1.4.0.233"
 #define TOTEM_CONE_VERSION          "0.8.6"
@@ -48,7 +47,6 @@ typedef struct {
 } totemPluginMimeEntry;
 
 class totemBasicPlayer;
-class totemComplexPlayer;
 class totemConePlayer;
 class totemGMPControls;
 class totemGMPError;
@@ -288,31 +286,6 @@ class totemPlugin {
     bool mAutoHref;
 #endif
 
-#if 0 //defined(TOTEM_COMPLEX_PLUGIN) && defined(HAVE_NSTARRAY_H)
-  public:
-
-    bool SetConsole (const char* aConsole);
-
-  private:
-
-    totemPlugin* FindConsoleClassRepresentant ();
-    void TransferConsole ();
-
-    void UnownedViewerSetup ();
-    void UnownedViewerSetWindow ();
-    void UnownedViewerUnsetWindow ();
-
-    totemNPObjectWrapper mPluginOwnerDocument;
-    char* mConsole;
-    char* mControls;
-
-    /* nsnull if we're the representant ourself */
-    totemPlugin *mConsoleClassRepresentant;
-
-    static nsTArray<totemPlugin*> *sPlugins;
-
-#endif /* TOTEM_COMPLEX_PLUGIN */
-
   public:
 
     enum ObjectEnum {
diff --git a/configure.in b/configure.in
index ff63733..26bb81e 100644
--- a/configure.in
+++ b/configure.in
@@ -667,12 +667,6 @@ AC_ARG_ENABLE([gmp-plugin],
 	[],[enable_gmp_plugin=yes])
 AC_MSG_RESULT([$enable_gmp_plugin])
 
-AC_MSG_CHECKING([whether to enable the Complex browser plugin])
-AC_ARG_ENABLE([complex-plugin],
-	AS_HELP_STRING([--enable-complex-plugin],[Whether to enable the complex browser plugin]),
-	[],[enable_complex_plugin=no])
-AC_MSG_RESULT([$enable_complex_plugin])
-
 AC_MSG_CHECKING([whether to enable the NarrowSpace browser plugin])
 AC_ARG_ENABLE([narrowspace-plugin],
 	AS_HELP_STRING([--enable-narrowspace-plugin],[Whether to enable the NarrowSpace browser plugin]),
@@ -694,7 +688,6 @@ AC_MSG_RESULT([$enable_cone_plugin])
 fi
 
 AM_CONDITIONAL([ENABLE_GMP_PLUGIN],[test "$enable_gmp_plugin" = "yes"])
-AM_CONDITIONAL([ENABLE_COMPLEX_PLUGIN],[test "$enable_complex_plugin" = "yes"])
 AM_CONDITIONAL([ENABLE_NARROWSPACE_PLUGIN],[test "$enable_narrowspace_plugin" = "yes"])
 AM_CONDITIONAL([ENABLE_MULLY_PLUGIN],[test "$enable_mully_plugin" = "yes"])
 AM_CONDITIONAL([ENABLE_CONE_PLUGIN],[test "$enable_cone_plugin" = "yes"])
@@ -895,11 +888,6 @@ if test x$enable_browser_plugins = xyes ; then
 	else
 		AC_MSG_NOTICE([   GMP (Windows Media) plugin disabled])
 	fi
-	if test x$enable_complex_plugin = xyes ; then
-		AC_MSG_NOTICE([** Complex (Real) plugin enabled])
-	else
-		AC_MSG_NOTICE([   Complex (Real) plugin disabled])
-	fi
 	if test x$enable_narrowspace_plugin = xyes ; then
 		AC_MSG_NOTICE([** NarrowSpace (QuickTime) plugin enabled])
 	else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]