nsCOMPtr<nsIWindowWatcher>   ww(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
nsCOMPtr<nsIWindowWatcher>   ww(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
nsNativeAppSupportWin::StartServerMode() {    // Turn on system tray icon.    SetupSysTrayIcon();    if (mShouldShowUI) {        // We dont have to anything anymore. The native UI        // will create the window        return NS_OK;    }    // Since native UI wont create any window, we create a hidden window    // so thing work alright.    // Create some of the objects we'll need.    nsCOMPtr<nsIWindowWatcher>   ww(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));    nsCOMPtr<nsISupportsString> arg1(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));    nsCOMPtr<nsISupportsString> arg2(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));    if ( !ww || !arg1 || !arg2 ) {        return NS_OK;    }    // Create the array for the arguments.    nsCOMPtr<nsISupportsArray>   argArray;    NS_NewISupportsArray( getter_AddRefs( argArray ) );    if ( !argArray ) {        return NS_OK;    }    // arg1 is the url to load.    // arg2 is the string that tells navigator.js to auto-close.    arg1->SetData( NS_LITERAL_STRING( "about:blank" ).get() );    arg2->SetData( NS_LITERAL_STRING( "turbo=yes" ).get() );    // Put args into array.    if ( NS_FAILED( argArray->AppendElement( arg1 ) ) ||        NS_FAILED( argArray->AppendElement( arg2 ) ) ) {        return NS_OK;    }    // Now open the window.    nsCOMPtr<nsIDOMWindow> newWindow;    ww->OpenWindow( 0,        "chrome://navigator/content",        "_blank",        "chrome,dialog=no,toolbar=no",        argArray,        getter_AddRefs( newWindow ) );    if ( !newWindow ) {        return NS_OK;    }    mInitialWindow = newWindow;    // Hide this window by re-parenting it (to ensure it doesn't appear).    ReParent( newWindow, (HWND)MessageWindow() );    return NS_OK;}