Diff for /chimera/NSBrowserView.mm between versions 1.18 and 1.21

version 1.18, 2002/02/10 01:12:05 version 1.21, 2002/02/13 01:58:55
Line 1185  nsHeaderSniffer::OnSecurityChange(nsIWeb Line 1185  nsHeaderSniffer::OnSecurityChange(nsIWeb
     print->Print(nsnull, nsnull);      print->Print(nsnull, nsnull);
 }  }
   
 -(void)printPreview  
 {  
     nsCOMPtr<nsIDOMWindow> domWindow;  
     _webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow));  
     nsCOMPtr<nsIInterfaceRequestor> ir(do_QueryInterface(domWindow));  
     nsCOMPtr<nsIWebBrowserPrint> print;  
     ir->GetInterface(NS_GET_IID(nsIWebBrowserPrint), getter_AddRefs(print));  
     print->PrintPreview(nsnull);  
 }  
   
 -(void)findInPage  -(void)findInPage
 {  {
     FindDlgController* findDialog = [[FindDlgController alloc] initWithWindowNibName: @"FindDialog"];      FindDlgController* findDialog = [[FindDlgController alloc] initWithWindowNibName: @"FindDialog"];
Line 1293  nsHeaderSniffer::OnSecurityChange(nsIWeb Line 1283  nsHeaderSniffer::OnSecurityChange(nsIWeb
     clipboard->SelectAll();      clipboard->SelectAll();
 }  }
   
   -(NSString*)getCurrentURLSpec
   {
       NSString* empty = @"";
       nsCOMPtr<nsIDOMWindow> domWindow;
       _webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow));
       if (!domWindow)
           return empty;
       
       nsCOMPtr<nsIDOMDocument> domDocument;
       domWindow->GetDocument(getter_AddRefs(domDocument));
       if (!domDocument)
           return empty;
       nsCOMPtr<nsIDOMNSDocument> nsDoc(do_QueryInterface(domDocument));
       if (!nsDoc)
           return empty;
       nsCOMPtr<nsIDOMLocation> location;
       nsDoc->GetLocation(getter_AddRefs(location));
       if (!location)
           return empty;
       nsAutoString urlStr;
       location->GetHref(urlStr);
       nsCAutoString urlCStr; urlCStr.AssignWithConversion(urlStr);
       
       return [NSString stringWithCString: urlCStr.get()];
   }
   
   - (void)setActive: (BOOL)aIsActive
   {
       nsCOMPtr<nsIWebBrowserFocus> wbf(do_QueryInterface(_webBrowser));
       if (aIsActive)
           wbf->Activate();
       else
           wbf->Deactivate();
   }
 @end  @end
   

Removed from v.1.18  
changed lines
  Added in v.1.21


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>