rv = mPluginTimer->Init(this, 1020 / 60, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
rv = mPluginTimer->Init(this, 1020 / 60, PR_TRUE, NS_TYPE_REPEATING_SLACK);
NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void){  nsIView   *view;  nsresult  rv = NS_ERROR_FAILURE;  float p2t;  if (nsnull != mOwner)  {    // Create view if necessary    mOwner->GetView(mContext, &view);    if (nsnull == view || nsnull == mWidget)    {      PRBool windowless = PR_FALSE;      mInstance->GetValue(nsPluginInstanceVariable_WindowlessBool, (void *)&windowless);      // always create widgets in Twips, not pixels      mContext->GetScaledPixelsToTwips(&p2t);      rv = mOwner->CreateWidget(mContext,                                NSIntPixelsToTwips(mPluginWindow.width, p2t),                                NSIntPixelsToTwips(mPluginWindow.height, p2t),                                windowless);      if (NS_OK == rv)      {        mOwner->GetView(mContext, &view);        if (view)        {          view->GetWidget(mWidget);          PRBool fTransparent = PR_FALSE;          mInstance->GetValue(nsPluginInstanceVariable_TransparentBool, (void *)&fTransparent);                    nsCOMPtr<nsIViewManager> vm;          view->GetViewManager(*getter_AddRefs(vm));          if (vm) {            vm->SetViewContentTransparency(view, fTransparent);          }        }        if (PR_TRUE == windowless)        {          mPluginWindow.type = nsPluginWindowType_Drawable;          mPluginWindow.window = nsnull; // this needs to be a HDC according to the spec,                                         // but I do not see the right way to release it                                         // so let's postpone passing HDC till paint event                                         // when it is really needed. Change spec?        }        else if (mWidget)        {          mWidget->Resize(mPluginWindow.width, mPluginWindow.height, PR_FALSE);          mPluginWindow.window = GetPluginPort();          mPluginWindow.type = nsPluginWindowType_Window;#if defined(XP_MAC)          // Is this needed in the windowless case ???          // start a periodic timer to provide null events to the plugin instance.          mPluginTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);          if (rv == NS_OK)            rv = mPluginTimer->Init(this, 1020 / 60, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);#endif        }      }    }  }  return rv;}