2002-09-16 00:07:07 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 11:12:37 +00:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2002-09-16 00:07:07 +00:00
|
|
|
|
|
|
|
#ifndef nsContextMenuInfo_h__
|
|
|
|
#define nsContextMenuInfo_h__
|
|
|
|
|
2004-02-28 02:00:23 +00:00
|
|
|
#include "nsCOMPtr.h"
|
2002-09-16 00:07:07 +00:00
|
|
|
#include "nsIContextMenuListener2.h"
|
|
|
|
#include "nsIDOMNode.h"
|
|
|
|
#include "nsIDOMEvent.h"
|
|
|
|
#include "imgIContainer.h"
|
|
|
|
#include "imgIRequest.h"
|
|
|
|
|
|
|
|
class ChromeContextMenuListener;
|
2012-10-12 12:43:01 +00:00
|
|
|
class imgRequestProxy;
|
2002-09-16 00:07:07 +00:00
|
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
// class nsContextMenuInfo
|
|
|
|
//
|
|
|
|
// Helper class for implementors of nsIContextMenuListener2
|
|
|
|
//*****************************************************************************
|
|
|
|
|
|
|
|
class nsContextMenuInfo : public nsIContextMenuInfo
|
|
|
|
{
|
|
|
|
friend class ChromeContextMenuListener;
|
|
|
|
|
|
|
|
public:
|
|
|
|
nsContextMenuInfo();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSICONTEXTMENUINFO
|
|
|
|
|
|
|
|
private:
|
|
|
|
virtual ~nsContextMenuInfo();
|
|
|
|
|
|
|
|
void SetMouseEvent(nsIDOMEvent *aEvent)
|
|
|
|
{ mMouseEvent = aEvent; }
|
2004-02-28 02:00:23 +00:00
|
|
|
|
2002-09-16 00:07:07 +00:00
|
|
|
void SetDOMNode(nsIDOMNode *aNode)
|
|
|
|
{ mDOMNode = aNode; }
|
|
|
|
|
|
|
|
void SetAssociatedLink(nsIDOMNode *aLink)
|
|
|
|
{ mAssociatedLink = aLink; }
|
|
|
|
|
2004-02-28 02:00:23 +00:00
|
|
|
nsresult GetImageRequest(nsIDOMNode *aDOMNode,
|
|
|
|
imgIRequest **aRequest);
|
2002-09-16 00:07:07 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool HasBackgroundImage(nsIDOMNode *aDOMNode);
|
2002-09-16 00:07:07 +00:00
|
|
|
|
2004-02-28 02:00:23 +00:00
|
|
|
nsresult GetBackgroundImageRequest(nsIDOMNode *aDOMNode,
|
2012-10-12 12:43:01 +00:00
|
|
|
imgRequestProxy **aRequest);
|
2002-09-16 00:07:07 +00:00
|
|
|
|
2004-02-28 02:00:23 +00:00
|
|
|
nsresult GetBackgroundImageRequestInternal(nsIDOMNode *aDOMNode,
|
2012-10-12 12:43:01 +00:00
|
|
|
imgRequestProxy **aRequest);
|
2002-09-16 00:07:07 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIDOMEvent> mMouseEvent;
|
2004-02-28 02:00:23 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> mDOMNode;
|
2002-09-16 00:07:07 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> mAssociatedLink;
|
|
|
|
|
|
|
|
}; // class nsContextMenuInfo
|
|
|
|
|
|
|
|
|
|
|
|
#endif // nsContextMenuInfo_h__
|