static nsresult OpenWindow(const char *urlstr, const PRUnichar *args, const char *aFeatures=0)
static nsresult OpenWindow(const nsAFlatCString& aChromeURL, const nsAFlatString& aAppArgs, PRInt32 aWidth, PRInt32 aHeight)
static nsresult OpenWindow(const char *urlstr, const PRUnichar *args, const char *aFeatures=0){#ifdef DEBUG_CMD_LINE  printf("OpenWindow(%s,?)\n",urlstr);#endif /* DEBUG_CMD_LINE */  nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));  nsCOMPtr<nsISupportsWString> sarg(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID));  if (!wwatch || !sarg)    return NS_ERROR_FAILURE;  sarg->SetData(args);  nsCAutoString features("chrome,dialog=no,all");  if (aFeatures && *aFeatures) {    features.Append(",");    features.Append(aFeatures);  }#ifdef DEBUG_CMD_LINE  printf("features: %s...\n", features.get());#endif /* DEBUG_CMD_LINE */  nsCOMPtr<nsIDOMWindow> newWindow;  nsresult rv;  rv = wwatch->OpenWindow(0, urlstr, "_blank",                          features.get(), sarg,                          getter_AddRefs(newWindow));  return rv;}