aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyBrowser.h
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyBrowser.h')
-rw-r--r--embed/mozilla/EphyBrowser.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/embed/mozilla/EphyBrowser.h b/embed/mozilla/EphyBrowser.h
index 31c2699e1..55b02e942 100644
--- a/embed/mozilla/EphyBrowser.h
+++ b/embed/mozilla/EphyBrowser.h
@@ -52,17 +52,14 @@ class EphyBrowser;
class EphyEventListener : public nsIDOMEventListener
{
public:
- EphyEventListener();
- virtual ~EphyEventListener();
-
- nsresult Init (EphyBrowser *aOwner);
-
NS_DECL_ISUPPORTS
// nsIDOMEventListener
-
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) = 0;
+ EphyEventListener(EphyBrowser *aOwner) : mOwner(aOwner) { };
+ virtual ~EphyEventListener() { };
+
protected:
EphyBrowser *mOwner;
};
@@ -71,6 +68,8 @@ class EphyDOMLinkEventListener : public EphyEventListener
{
public:
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
+
+ EphyDOMLinkEventListener(EphyBrowser *aOwner) : EphyEventListener(aOwner) { };
private:
nsresult GetDocURI (nsIDOMElement *aElement,
nsIURI **aDocURI);
@@ -81,18 +80,24 @@ class EphyPopupBlockEventListener : public EphyEventListener
{
public:
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
+
+ EphyPopupBlockEventListener(EphyBrowser *aOwner) : EphyEventListener(aOwner) { };
};
class EphyModalAlertEventListener : public EphyEventListener
{
public:
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
+
+ EphyModalAlertEventListener(EphyBrowser *aOwner) : EphyEventListener(aOwner) { };
};
class EphyDOMContentLoadedEventListener : public EphyEventListener
{
public:
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
+
+ EphyDOMContentLoadedEventListener(EphyBrowser *aOwner) : EphyEventListener(aOwner) { };
};
class EphyContextMenuListener : public nsIDOMContextMenuListener
@@ -100,16 +105,13 @@ class EphyContextMenuListener : public nsIDOMContextMenuListener
public:
NS_DECL_ISUPPORTS
- EphyContextMenuListener();
- virtual ~EphyContextMenuListener();
-
- nsresult Init(EphyBrowser *aOwner);
-
// nsIDOMContextMenuListener
-
NS_IMETHOD ContextMenu(nsIDOMEvent *aEvent);
NS_IMETHOD HandleEvent(nsIDOMEvent *aEvent);
+ EphyContextMenuListener(EphyBrowser *aOwner) : mOwner(aOwner) { };
+ virtual ~EphyContextMenuListener() { };
+
protected:
EphyBrowser *mOwner;
};