Diff for /chimera/BrowserWindowController.mm between versions 1.58 and 1.59

version 1.58, 2002/04/12 08:45:17 version 1.59, 2002/04/12 09:56:34
Line 40 Line 40
 #import "IconTabViewItem.h"  #import "IconTabViewItem.h"
   
 #include "nsIWebNavigation.h"  #include "nsIWebNavigation.h"
   #include "nsIDOMNode.h"
   #include "nsIDOMEvent.h"
   #include "nsIContextMenuListener.h"
 #include "nsCocoaBrowserService.h"  #include "nsCocoaBrowserService.h"
   
 static NSString *BrowserToolbarIdentifier       = @"Browser Window Toolbar";  static NSString *BrowserToolbarIdentifier       = @"Browser Window Toolbar";
Line 101  static NSString *PrintToolbarItemIdentif Line 104  static NSString *PrintToolbarItemIdentif
         mMoveReentrant = NO;          mMoveReentrant = NO;
         mShouldAutosave = YES;          mShouldAutosave = YES;
         mChromeMask = 0;          mChromeMask = 0;
           mContextMenuFlags = 0;
           mContextMenuEvent = nsnull;
           mContextMenuNode = nsnull;
     }      }
     return self;      return self;
 }  }
Line 664  static NSString *PrintToolbarItemIdentif Line 670  static NSString *PrintToolbarItemIdentif
   mChromeMask = aMask;    mChromeMask = aMask;
 }  }
   
   // Called when a context menu should be shown.
   - (void)onShowContextMenu:(int)flags domEvent:(nsIDOMEvent*)aEvent domNode:(nsIDOMNode*)aNode
   {
     mContextMenuFlags = flags;
     mContextMenuNode = aNode;
     NS_IF_ADDREF(aNode);
     mContextMenuEvent = aEvent;
     NS_IF_ADDREF(aEvent);
   }
   
   - (NSMenu*)getContextMenu
   {
     NSMenu* result = nil;
     if ((mContextMenuFlags & nsIContextMenuListener::CONTEXT_LINK) != 0) {
       if ((mContextMenuFlags & nsIContextMenuListener::CONTEXT_IMAGE) != 0) {
         result = mImageLinkMenu;
       }
       else
         result = mLinkMenu;
     }
     else if ((mContextMenuFlags & nsIContextMenuListener::CONTEXT_INPUT) != 0 ||
              (mContextMenuFlags & nsIContextMenuListener::CONTEXT_TEXT) != 0) {
       result = mInputMenu;
     }
     else if ((mContextMenuFlags & nsIContextMenuListener::CONTEXT_IMAGE) != 0) {
       result = mImageMenu;
     }
     else if ((mContextMenuFlags & nsIContextMenuListener::CONTEXT_DOCUMENT) != 0) {
       result = mPageMenu;
     }
     
     NS_IF_RELEASE(mContextMenuNode);
     mContextMenuNode = nsnull;
     NS_IF_RELEASE(mContextMenuEvent);
     mContextMenuEvent = nsnull;
     return result;
   }
   
 @end  @end
   

Removed from v.1.58  
changed lines
  Added in v.1.59


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