chrome->SetUI(new Win32ChromeUI);
nsresult CreateBrowserWindow(PRUint32 aChromeFlags,           nsIWebBrowserChrome *aParent, nsIWebBrowserChrome **aNewWindow){  WebBrowserChrome * chrome = new WebBrowserChrome();  if (!chrome)    return NS_ERROR_FAILURE;  CallQueryInterface(NS_STATIC_CAST(nsIWebBrowserChrome*, chrome), aNewWindow);  chrome->SetChromeFlags(aChromeFlags);  // Note, the chrome owns the UI object once set & will delete it  chrome->SetUI(new Win32ChromeUI);  // Insert the browser  nsCOMPtr<nsIWebBrowser> newBrowser;  chrome->CreateBrowser(-1, -1, -1, -1, getter_AddRefs(newBrowser));  if (!newBrowser)    return NS_ERROR_FAILURE;  // Place it where we want it.  ResizeEmbedding(NS_STATIC_CAST(nsIWebBrowserChrome*, chrome));  return NS_OK;}