diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-05-15 04:19:51 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-05-15 04:19:51 +0800 |
commit | 26c0657a5dbb31e1e380645dffef2f71adcfe566 (patch) | |
tree | 007e5763a82701c0d1755597e4850597b35085aa /embed/mozilla/EphyBrowser.cpp | |
parent | 4a770ac2d3e35cfc5a32333001ebef8d45bce77f (diff) | |
download | gsoc2013-epiphany-26c0657a5dbb31e1e380645dffef2f71adcfe566.tar gsoc2013-epiphany-26c0657a5dbb31e1e380645dffef2f71adcfe566.tar.gz gsoc2013-epiphany-26c0657a5dbb31e1e380645dffef2f71adcfe566.tar.bz2 gsoc2013-epiphany-26c0657a5dbb31e1e380645dffef2f71adcfe566.tar.lz gsoc2013-epiphany-26c0657a5dbb31e1e380645dffef2f71adcfe566.tar.xz gsoc2013-epiphany-26c0657a5dbb31e1e380645dffef2f71adcfe566.tar.zst gsoc2013-epiphany-26c0657a5dbb31e1e380645dffef2f71adcfe566.zip |
No need to have Init on the event listener classes, move that
2005-05-14 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyBrowser.h:
No need to have Init on the event listener classes, move that
Diffstat (limited to 'embed/mozilla/EphyBrowser.cpp')
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 61 |
1 files changed, 5 insertions, 56 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 819f7269c..e20bb86b0 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -111,26 +111,8 @@ const static PRUnichar kTypeAttr[] = { 't', 'y', 'p', 'e', '\0' }; const static PRUnichar kTitleAttr[] = { 't', 'i', 't', 'l', 'e', '\0' }; const static PRUnichar kRelAttr[] = { 'r', 'e', 'l', '\0' }; -EphyEventListener::EphyEventListener() -: mOwner(nsnull) -{ - LOG ("EphyEventListener ctor (%p)", this); -} - -EphyEventListener::~EphyEventListener() -{ - LOG ("EphyEventListener dtor (%p)", this); -} - NS_IMPL_ISUPPORTS1(EphyEventListener, nsIDOMEventListener) -nsresult -EphyEventListener::Init (EphyBrowser *aOwner) -{ - mOwner = aOwner; - return NS_OK; -} - NS_IMETHODIMP EphyDOMLinkEventListener::HandleEvent (nsIDOMEvent* aDOMEvent) { @@ -406,26 +388,8 @@ EphyModalAlertEventListener::HandleEvent (nsIDOMEvent * aDOMEvent) return NS_OK; } -EphyContextMenuListener::EphyContextMenuListener() -: mOwner(nsnull) -{ - LOG ("EphyContextMenuListener ctor (%p)", this); -} - -EphyContextMenuListener::~EphyContextMenuListener() -{ - LOG ("EphyContextMenuListener dtor (%p)", this); -} - NS_IMPL_ISUPPORTS1(EphyContextMenuListener, nsIDOMContextMenuListener) -nsresult -EphyContextMenuListener::Init(EphyBrowser *aOwner) -{ - mOwner = aOwner; - return NS_OK; -} - NS_IMETHODIMP EphyContextMenuListener::ContextMenu (nsIDOMEvent* aDOMEvent) { @@ -534,36 +498,21 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed) rv = mDOMWindow->GetDocument (getter_AddRefs (domDocument)); NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); - mDOMLinkEventListener = new EphyDOMLinkEventListener(); + mDOMLinkEventListener = new EphyDOMLinkEventListener(this); if (!mDOMLinkEventListener) return NS_ERROR_OUT_OF_MEMORY; - rv = mDOMLinkEventListener->Init (this); - NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); - - mDOMContentLoadedEventListener = new EphyDOMContentLoadedEventListener(); + mDOMContentLoadedEventListener = new EphyDOMContentLoadedEventListener(this); if (!mDOMContentLoadedEventListener) return NS_ERROR_OUT_OF_MEMORY; - rv = mDOMContentLoadedEventListener->Init (this); - NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); - - mPopupBlockEventListener = new EphyPopupBlockEventListener(); + mPopupBlockEventListener = new EphyPopupBlockEventListener(this); if (!mPopupBlockEventListener) return NS_ERROR_OUT_OF_MEMORY; - rv = mPopupBlockEventListener->Init (this); - NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); - - mModalAlertListener = new EphyModalAlertEventListener (); + mModalAlertListener = new EphyModalAlertEventListener (this); if (!mModalAlertListener) return NS_ERROR_OUT_OF_MEMORY; - rv = mModalAlertListener->Init (this); - NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); - - mContextMenuListener = new EphyContextMenuListener(); + mContextMenuListener = new EphyContextMenuListener(this); if (!mContextMenuListener) return NS_ERROR_OUT_OF_MEMORY; - rv = mContextMenuListener->Init (this); - NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); - rv = GetListener(); NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); |