Hi all,
A new interface has been checked in called nsIWebBrowserSiteWindow. This
is a cut-down version of the nsIBaseWindow containing only the methods
that an embedding client needs to implement. It was considered that
nsIBaseWindow was too confusing by its inclusion of both "up" and "down"
style methods that are used extensively in the DOM/layout/widget world
but which were not relevant to embedders.
The webbrowser object has been modified to call the new
nsIWebBrowserSiteWindow methods where it used to call nsIBaseWindow.
This means you must make some simple modifications to your code or it
will no longer function correctly. Where you delared your chrome object
like this:
#include "nsIBaseWindow.h"
class CMyChrome : public nsIBaseWindow, //....
{
NS_DECL_NSIBASEWINDOW
};
You now do this:
#include "nsIWebBrowserSiteWindow.h"
class CMyChrome : public nsIWebBrowserSiteWindow, //....
{
NS_DECL_NSIWEBBROWSERSITEWINDOW
};
Likewise, change the appropriate CPP file NS_INTERFACE_MAP_ENTRY macro
from nsIBaseWindow to nsIWebBrowserSiteWindow.
Then delete your implementations of the following nsIBaseWindow methods
but keep the rest:
InitWindow
Create
Repaint
GetParentWidget
SetParentWidget
GetParentNativeWindow (* see below *)
SetParentNativeWindow
GetVisibility
SetVisibility
GetMainWidget
FocusAvailable
Note that nsIWebBrowserSiteWindow has one new property - the read only
"siteWindow" which should return the native window handle. It is
equivalent to the old "parentNativeWindow" property so you may rename
the GetParentNativeWindow to GetSiteWindow and change the parameter type
from "nativeWindow" to "void *" to implement it.
It is possible that the new interface may undergo further review when
nsIWebBrowserChrome is reconsidered.
Adam