webBrowserBaseWindow = do_QueryInterface(moz->embed_private->webBrowser); if (!webBrowserBaseWindow) printf("no webBrowserBaseWindow\n"); webBrowserBaseWindow->InitWindow(widget, NULL, 0, 0, widget->area.size.w, widget->area.size.h); webBrowserBaseWindow->Create(); webBrowserBaseWindow->GetVisibility(&visibility);  uriListener = do_QueryInterface(moz->embed_private->embed); if (!uriListener) printf("no uriListener\n"); moz->embed_private->webBrowser->SetParentURIContentListener(uriListener);
static void mozilla_realized( PtWidget_t *widget ){	PtMozillaWidget_t *moz = (PtMozillaWidget_t *)widget;	nsCOMPtr<nsIURIContentListener> uriListener;	nsCOMPtr<nsIBaseWindow> webBrowserBaseWindow;	PRBool visibility;	PtSuperClassRealized(PtContainer, widget);	// init our window	webBrowserBaseWindow = do_QueryInterface(moz->embed_private->webBrowser);	if (!webBrowserBaseWindow)		printf("no webBrowserBaseWindow\n");	webBrowserBaseWindow->InitWindow(widget, NULL, 0, 0, widget->area.size.w, widget->area.size.h);	webBrowserBaseWindow->Create();	webBrowserBaseWindow->GetVisibility(&visibility);	// set our webBrowser object as the content listener object	uriListener = do_QueryInterface(moz->embed_private->embed);	if (!uriListener)		printf("no uriListener\n");	moz->embed_private->webBrowser->SetParentURIContentListener(uriListener);	// show it	webBrowserBaseWindow->SetVisibility(PR_TRUE);	// If an initial url was stored, load it	if (moz->url[0])		mozilla_embed_load_url(widget, moz->url);}