if (mPrintListener) mPrintListener->OnEndPrinting(NS_OK);
void DocumentViewerImpl::DocumentReadyForPrinting(){  nsCOMPtr<nsIWebShell> webContainer;  webContainer = do_QueryInterface(mContainer);  if(webContainer) {    //    // Remove ourselves as an image group observer...    //    nsCOMPtr<nsIImageGroup> imageGroup;    mPrintPC->GetImageGroup(getter_AddRefs(imageGroup));    if (imageGroup) {      imageGroup->RemoveObserver(this);    }    //    // Send the document to the printer...    //    nsresult rv = PrintContent(webContainer, mPrintDC);    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "bad result from PrintConent");    // printing is complete, clean up now    mIsPrinting = PR_FALSE;    mPrintPS->EndObservingDocument();    NS_RELEASE(mPrintPS);    NS_RELEASE(mPrintVM);    NS_RELEASE(mPrintSS);    NS_RELEASE(mPrintDC);  }}