Diff for /chimera/MyBrowserView.mm between versions 1.18 and 1.22

version 1.18, 2002/02/13 01:58:55 version 1.22, 2002/03/07 18:35:48
Line 3 Line 3
  */   */
   
 #import "MyBrowserView.h"  #import "MyBrowserView.h"
   #import "BrowserWindowController.h"
   
 #include "nsCOMPtr.h"  #include "nsCOMPtr.h"
 #include "nsIServiceManager.h"  #include "nsIServiceManager.h"
 #include "nsIIOService.h"  #include "nsIIOService.h"
   #include "ContentClickListener.h"
   #include "nsIDOMWindow.h"
   #include "nsIChromeEventHandler.h"
   #include "nsPIDOMWindow.h"
   #include "nsIDOMEventReceiver.h"
   
 #define DOCUMENT_DONE_STRING @"Document: Done"  #define DOCUMENT_DONE_STRING @"Document: Done"
 #define LOADING_STRING @"Loading..."  #define LOADING_STRING @"Loading..."
Line 49  static const char* ioServiceContractID = Line 55  static const char* ioServiceContractID =
     mIsPrimary = NO;      mIsPrimary = NO;
     [[NSNotificationCenter defaultCenter] removeObserver:self];      [[NSNotificationCenter defaultCenter] removeObserver:self];
           
    //[browserView setActive: NO];    [browserView setActive: NO];
 }  }
   
 - (id)initWithFrame:(NSRect)frameRect  - (id)initWithFrame:(NSRect)frameRect
Line 60  static const char* ioServiceContractID = Line 66  static const char* ioServiceContractID =
     [browserView setContainer:self];      [browserView setContainer:self];
     [browserView addListener:self];      [browserView addListener:self];
     mIsBusy = NO;      mIsBusy = NO;
       mListenersAttached = NO;
     return self;      return self;
 }  }
   
Line 73  static const char* ioServiceContractID = Line 80  static const char* ioServiceContractID =
   progressSuper = [aProgress superview];    progressSuper = [aProgress superview];
   mWindowController = aWindowController;    mWindowController = aWindowController;
       
  if (!mIsBusy) {  if (!mIsBusy)
    [progress retain];      [progress removeFromSuperview];
    [progress removeFromSuperview]; 
  } 
       
   defaultStatus = NULL;    defaultStatus = NULL;
   loadingStatus = DOCUMENT_DONE_STRING;    loadingStatus = DOCUMENT_DONE_STRING;
Line 100  static const char* ioServiceContractID = Line 105  static const char* ioServiceContractID =
   // Update the URL bar.    // Update the URL bar.
   [mWindowController updateLocationFields:[self getCurrentURLSpec]];    [mWindowController updateLocationFields:[self getCurrentURLSpec]];
       
  //[browserView setActive: YES];  if (mWindowController && !mListenersAttached) {
     mListenersAttached = YES;
     
     // We need to hook up our click and context menu listeners.
     ContentClickListener* clickListener = new ContentClickListener(mWindowController);
     if (!clickListener)
       return;
     
     nsCOMPtr<nsIDOMWindow> contentWindow = getter_AddRefs([[self getBrowserView] getContentWindow]);
     nsCOMPtr<nsPIDOMWindow> piWindow(do_QueryInterface(contentWindow));
     nsCOMPtr<nsIChromeEventHandler> chromeHandler;
     piWindow->GetChromeEventHandler(getter_AddRefs(chromeHandler));
     nsCOMPtr<nsIDOMEventReceiver> rec(do_QueryInterface(chromeHandler));
     rec->AddEventListenerByIID(clickListener, NS_GET_IID(nsIDOMMouseListener));
   }
 }  }
   
 -(NSString*)getCurrentURLSpec  -(NSString*)getCurrentURLSpec
Line 132  static const char* ioServiceContractID = Line 151  static const char* ioServiceContractID =
   }    }
   
   [progressSuper addSubview:progress];    [progressSuper addSubview:progress];
   [progress release];  
   [progress setIndeterminate:YES];    [progress setIndeterminate:YES];
   [progress startAnimation:self];    [progress startAnimation:self];
   
Line 150  static const char* ioServiceContractID = Line 168  static const char* ioServiceContractID =
 {  {
   [progress setIndeterminate:YES];    [progress setIndeterminate:YES];
   [progress stopAnimation:self];    [progress stopAnimation:self];
   [progress retain];  
   [progress removeFromSuperview];    [progress removeFromSuperview];
   
   loadingStatus = DOCUMENT_DONE_STRING;    loadingStatus = DOCUMENT_DONE_STRING;
Line 283  static const char* ioServiceContractID = Line 300  static const char* ioServiceContractID =
   
 - (NSBrowserView*)createBrowserWindow:(unsigned int)mask  - (NSBrowserView*)createBrowserWindow:(unsigned int)mask
 {  {
  // XXX not implemented   BrowserWindowController* controller = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"];
  return NULL;  [controller enterModalSession];
   return [[controller getMyBrowserView] getBrowserView];
 }  }
   
 - (NSBrowserView*)getBrowserView  - (NSBrowserView*)getBrowserView

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


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