Diff for /chimera/NSBrowserView.mm between versions 1.34 and 1.35

version 1.34, 2002/04/20 00:02:55 version 1.35, 2002/04/20 00:44:56
Line 927  nsHeaderSniffer::OnSecurityChange(nsIWeb Line 927  nsHeaderSniffer::OnSecurityChange(nsIWeb
   
 - (id)initWithFrame:(NSRect)frame  - (id)initWithFrame:(NSRect)frame
 {  {
  [super initWithFrame:frame];    if ( (self = [super initWithFrame:frame]) ) {
   
  nsresult rv = nsCocoaBrowserService::InitEmbedding();        nsresult rv = nsCocoaBrowserService::InitEmbedding();
  if (NS_FAILED(rv)) {        if (NS_FAILED(rv)) {
     // XXX need to throw      // XXX need to throw
  }        }
   
  _listener = new nsCocoaBrowserListener(self); 
  NS_ADDREF(_listener); 
   
           _listener = new nsCocoaBrowserListener(self);
           NS_ADDREF(_listener);
           
   // Create the web browser instance    // Create the web browser instance
  nsCOMPtr<nsIWebBrowser> browser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID, &rv);        nsCOMPtr<nsIWebBrowser> browser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID, &rv);
  if (NS_FAILED(rv)) {        if (NS_FAILED(rv)) {
     // XXX need to throw      // XXX need to throw
  }        }
 
  _webBrowser = browser; 
  NS_ADDREF(_webBrowser); 
   
           _webBrowser = browser;
           NS_ADDREF(_webBrowser);
           
   // Set the container nsIWebBrowserChrome    // Set the container nsIWebBrowserChrome
  _webBrowser->SetContainerWindow(NS_STATIC_CAST(nsIWebBrowserChrome *,         _webBrowser->SetContainerWindow(NS_STATIC_CAST(nsIWebBrowserChrome *,
                                                 _listener));                                                       _listener));
          
   // Register as a listener for web progress    // Register as a listener for web progress
  nsCOMPtr<nsIWeakReference> weak = do_GetWeakReference(NS_STATIC_CAST(nsIWebProgressListener*, _listener));        nsCOMPtr<nsIWeakReference> weak = do_GetWeakReference(NS_STATIC_CAST(nsIWebProgressListener*, _listener));
  _webBrowser->AddWebBrowserListener(weak, NS_GET_IID(nsIWebProgressListener));        _webBrowser->AddWebBrowserListener(weak, NS_GET_IID(nsIWebProgressListener));
        
   // Hook up the widget hierarchy with us as the parent    // Hook up the widget hierarchy with us as the parent
  nsCOMPtr<nsIBaseWindow> baseWin = do_QueryInterface(_webBrowser);        nsCOMPtr<nsIBaseWindow> baseWin = do_QueryInterface(_webBrowser);
  baseWin->InitWindow((NSView*)self, nsnull, 0, 0,         baseWin->InitWindow((NSView*)self, nsnull, 0, 0,
                      frame.size.width, frame.size.height);                            frame.size.width, frame.size.height);
  baseWin->Create();        baseWin->Create();
    }
   return self;    return self;
 }  }
   

Removed from v.1.34  
changed lines
  Added in v.1.35


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