if (PR_TRUE == windowless) { mPluginWindow.window = nsnull; mPluginWindow.type = nsPluginWindowType_Drawable; } else {  mPluginWindow.window = GetPluginPort(); mPluginWindow.type = nsPluginWindowType_Window;
result = view->CreateWidget(kWidgetCID);
NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void){  nsIView   *view;  nsresult  rv = NS_ERROR_FAILURE;  if (nsnull != mOwner)  {    // Create view if necessary    mOwner->GetView(&view);    if (nsnull == view)    {      PRBool    windowless;      mInstance->GetValue(nsPluginInstanceVariable_WindowlessBool, (void *)&windowless);      rv = mOwner->CreateWidget(mPluginWindow.width,                                mPluginWindow.height,                                windowless);      if (NS_OK == rv)      {        nsIView   *view;        mOwner->GetView(&view);        view->GetWidget(mWidget);        if (PR_TRUE == windowless)        {          mPluginWindow.window = nsnull;    //XXX this needs to be a HDC          mPluginWindow.type = nsPluginWindowType_Drawable;        }        else        {          // mPluginWindow.window = (nsPluginPort *)mWidget->GetNativeData(NS_NATIVE_WINDOW);          mPluginWindow.window = GetPluginPort();          mPluginWindow.type = nsPluginWindowType_Window;#if defined(XP_MAC)          // start a periodic timer to provide null events to the plugin instance.          rv = NS_NewTimer(&mPluginTimer);          if (rv == NS_OK)	        rv = mPluginTimer->Init(this, 1000 / 60);#endif        }      }    }  }  return rv;}