Author: zbowling
Date: 2006-05-18 23:27:01 -0400 (Thu, 18 May 2006)
New Revision: 60855
Modified:
trunk/mozembed/src/EmbedPrivate.cpp
trunk/mozembed/src/EmbedPrivate.h
Log:
oops,
that was broken
Modified: trunk/mozembed/src/EmbedPrivate.cpp
===================================================================
--- trunk/mozembed/src/EmbedPrivate.cpp 2006-05-19 01:24:28 UTC (rev 60854)
+++ trunk/mozembed/src/EmbedPrivate.cpp 2006-05-19 03:27:01 UTC (rev 60855)
@@ -116,14 +116,35 @@
#ifndef FIREFOX_1_5
mStream = nsnull;
#endif
+
+ sWindowList.push_back((Handle*)this);
+
PushStartup();
}
EmbedPrivate::~EmbedPrivate()
{
+ sWindowList.remove((Handle*)this);
PopStartup();
}
+/* static */
+EmbedPrivate *
+EmbedPrivate::FindPrivateForBrowser(nsIWebBrowserChrome *aBrowser)
+{
+ list<Handle>::const_iterator i;
+ for (i = sWindowList.begin(); i != sWindowList.end(); ++i)
+ {
+ EmbedPrivate *t = NS_STATIC_CAST(EmbedPrivate *, *i);
+ nsIWebBrowserChrome *chrome = NS_STATIC_CAST(nsIWebBrowserChrome *,
t->mWindow);
+ if (chrome == aBrowser)
+ {
+ return t;
+ }
+ }
+ return nsnull;
+}
+
nsresult
EmbedPrivate::Init(Handle *aOwningWidget)
{
Modified: trunk/mozembed/src/EmbedPrivate.h
===================================================================
--- trunk/mozembed/src/EmbedPrivate.h 2006-05-19 01:24:28 UTC (rev 60854)
+++ trunk/mozembed/src/EmbedPrivate.h 2006-05-19 03:27:01 UTC (rev 60855)
@@ -37,7 +37,7 @@
#include <nsIGenericFactory.h>
#include <nsIComponentRegistrar.h>
-#include <vector>
+#include <list>
using namespace std;
#ifndef __EmbedPrivate_h
@@ -192,6 +192,8 @@
// the currently loaded uri
nsEmbedString mURI;
+ static list<Handle> sWindowList;
+
PRUint32 mHeight;
PRUint32 mWidth;
// the number of widgets that have been created
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches