Bug 607224, followup to use separate interface, r=neil,a=blocking

This commit is contained in:
Neil Deakin 2011-01-17 09:36:33 -05:00
Родитель 2672504f59
Коммит 99e6f59186
3 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -41,7 +41,7 @@
interface nsIDOMElement;
interface nsIDOMKeyEvent;
[scriptable, uuid(3931F141-D640-48AB-A792-719D62CF1736)]
[scriptable, uuid(F5099746-5049-4e81-A03E-945D5110FEE2)]
interface nsIMenuBoxObject : nsISupports
{
void openMenu(in boolean openFlag);
@ -49,7 +49,13 @@ interface nsIMenuBoxObject : nsISupports
attribute nsIDOMElement activeChild;
boolean handleKeyPress(in nsIDOMKeyEvent keyEvent);
};
// This interface is implemented by menus, but could also
// be implemented by menubars
[scriptable, uuid(D03150F6-92A3-4307-A73C-864C8DAD3F22)]
interface nsIMenuBoxObject_MOZILLA_2_0_BRANCH : nsISupports
{
// true if the menu or menubar was opened via a keypress.
readonly attribute boolean openedWithKey;
};

Просмотреть файл

@ -46,11 +46,14 @@
#include "nsMenuFrame.h"
#include "nsMenuPopupFrame.h"
class nsMenuBoxObject : public nsIMenuBoxObject, public nsBoxObject
class nsMenuBoxObject : public nsIMenuBoxObject,
public nsBoxObject,
public nsIMenuBoxObject_MOZILLA_2_0_BRANCH
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIMENUBOXOBJECT
NS_DECL_NSIMENUBOXOBJECT_MOZILLA_2_0_BRANCH
nsMenuBoxObject();
virtual ~nsMenuBoxObject();
@ -64,7 +67,7 @@ nsMenuBoxObject::~nsMenuBoxObject()
{
}
NS_IMPL_ISUPPORTS_INHERITED1(nsMenuBoxObject, nsBoxObject, nsIMenuBoxObject)
NS_IMPL_ISUPPORTS_INHERITED2(nsMenuBoxObject, nsBoxObject, nsIMenuBoxObject, nsIMenuBoxObject_MOZILLA_2_0_BRANCH)
/* void openMenu (in boolean openFlag); */
NS_IMETHODIMP nsMenuBoxObject::OpenMenu(PRBool aOpenFlag)

Просмотреть файл

@ -62,7 +62,7 @@
<property name="openedWithKey" readonly="true">
<getter><![CDATA[
return this.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject).openedWithKey;
return this.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject_MOZILLA_2_0_BRANCH).openedWithKey;
]]></getter>
</property>