michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsContextMenuInfo_h__ michael@0: #define nsContextMenuInfo_h__ michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIContextMenuListener2.h" michael@0: #include "nsIDOMNode.h" michael@0: #include "nsIDOMEvent.h" michael@0: #include "imgIContainer.h" michael@0: #include "imgIRequest.h" michael@0: michael@0: class ChromeContextMenuListener; michael@0: class imgRequestProxy; michael@0: michael@0: //***************************************************************************** michael@0: // class nsContextMenuInfo michael@0: // michael@0: // Helper class for implementors of nsIContextMenuListener2 michael@0: //***************************************************************************** michael@0: michael@0: class nsContextMenuInfo : public nsIContextMenuInfo michael@0: { michael@0: friend class ChromeContextMenuListener; michael@0: michael@0: public: michael@0: nsContextMenuInfo(); michael@0: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSICONTEXTMENUINFO michael@0: michael@0: private: michael@0: virtual ~nsContextMenuInfo(); michael@0: michael@0: void SetMouseEvent(nsIDOMEvent *aEvent) michael@0: { mMouseEvent = aEvent; } michael@0: michael@0: void SetDOMNode(nsIDOMNode *aNode) michael@0: { mDOMNode = aNode; } michael@0: michael@0: void SetAssociatedLink(nsIDOMNode *aLink) michael@0: { mAssociatedLink = aLink; } michael@0: michael@0: nsresult GetImageRequest(nsIDOMNode *aDOMNode, michael@0: imgIRequest **aRequest); michael@0: michael@0: bool HasBackgroundImage(nsIDOMNode *aDOMNode); michael@0: michael@0: nsresult GetBackgroundImageRequest(nsIDOMNode *aDOMNode, michael@0: imgRequestProxy **aRequest); michael@0: michael@0: nsresult GetBackgroundImageRequestInternal(nsIDOMNode *aDOMNode, michael@0: imgRequestProxy **aRequest); michael@0: michael@0: private: michael@0: nsCOMPtr mMouseEvent; michael@0: nsCOMPtr mDOMNode; michael@0: nsCOMPtr mAssociatedLink; michael@0: michael@0: }; // class nsContextMenuInfo michael@0: michael@0: michael@0: #endif // nsContextMenuInfo_h__