aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphySidebar.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-05-01 22:04:24 +0800
committerChristian Persch <chpe@src.gnome.org>2005-05-01 22:04:24 +0800
commit165179754e9c3a75b1c5405dd14dc6ea6939dca3 (patch)
treee76d6ba2a23d824e2c42458f68b705c7b24a157c /embed/mozilla/EphySidebar.cpp
parentacb714c91f67a95851bada8d1c272e52b579f3ab (diff)
downloadgsoc2013-epiphany-165179754e9c3a75b1c5405dd14dc6ea6939dca3.tar
gsoc2013-epiphany-165179754e9c3a75b1c5405dd14dc6ea6939dca3.tar.gz
gsoc2013-epiphany-165179754e9c3a75b1c5405dd14dc6ea6939dca3.tar.bz2
gsoc2013-epiphany-165179754e9c3a75b1c5405dd14dc6ea6939dca3.tar.lz
gsoc2013-epiphany-165179754e9c3a75b1c5405dd14dc6ea6939dca3.tar.xz
gsoc2013-epiphany-165179754e9c3a75b1c5405dd14dc6ea6939dca3.tar.zst
gsoc2013-epiphany-165179754e9c3a75b1c5405dd14dc6ea6939dca3.zip
Simplify the class info implementation for EphySidebar.
2005-05-01 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphySidebar.cpp: * embed/mozilla/EphySidebar.h: * embed/mozilla/MozRegisterComponents.cpp: Simplify the class info implementation for EphySidebar.
Diffstat (limited to 'embed/mozilla/EphySidebar.cpp')
-rw-r--r--embed/mozilla/EphySidebar.cpp91
1 files changed, 1 insertions, 90 deletions
diff --git a/embed/mozilla/EphySidebar.cpp b/embed/mozilla/EphySidebar.cpp
index 479ae63ad..fda1babd8 100644
--- a/embed/mozilla/EphySidebar.cpp
+++ b/embed/mozilla/EphySidebar.cpp
@@ -36,8 +36,7 @@
#include "ephy-embed-single.h"
#include "ephy-debug.h"
-/* Implementation file */
-NS_IMPL_ISUPPORTS2(EphySidebar, nsISidebar, nsIClassInfo)
+NS_IMPL_ISUPPORTS1_CI(EphySidebar, nsISidebar)
EphySidebar::EphySidebar()
{
@@ -103,91 +102,3 @@ EphySidebar::AddSearchEngine (const char *aEngineURL,
return NS_OK;
}
-
-//------------------------------------------------------------------------------
-//nsIClassInfo Impl.
-//------------------------------------------------------------------------------
-
-/* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */
-NS_IMETHODIMP EphySidebar::GetInterfaces(PRUint32 *aCount, nsIID * **aArray)
-{
- PRUint32 count = 2;
-
- *aCount = count;
-
- *aArray = NS_STATIC_CAST(nsIID **, nsMemory::Alloc(count * sizeof(nsIID *)));
- NS_ENSURE_TRUE(*aArray, NS_ERROR_OUT_OF_MEMORY);
-
- nsIID *iid = NS_STATIC_CAST(nsIID *,
- nsMemory::Clone(&(NS_GET_IID(nsISidebar)),
- sizeof(nsIID)));
- if (!iid)
- {
- NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(0, *aArray);
-
- return NS_ERROR_OUT_OF_MEMORY;
- }
- (*aArray)[0] = iid;
-
-
- iid = NS_STATIC_CAST(nsIID *,
- nsMemory::Clone(&(NS_GET_IID(nsIClassInfo)),
- sizeof(nsIID)));
- if (!iid)
- {
- NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(1, *aArray);
-
- return NS_ERROR_OUT_OF_MEMORY;
- }
- (*aArray)[1] = iid;
-
- return NS_OK;
-}
-
-/* nsISupports getHelperForLanguage (in PRUint32 language); */
-NS_IMETHODIMP EphySidebar::GetHelperForLanguage(PRUint32 language, nsISupports **_retval)
-{
- *_retval = nsnull;
- return NS_OK;
-}
-
-/* readonly attribute string contractID; */
-NS_IMETHODIMP EphySidebar::GetContractID(char * *aContractID)
-{
- *aContractID = nsCRT::strdup(NS_SIDEBAR_CONTRACTID);
- return NS_OK;
-}
-
-/* readonly attribute string classDescription; */
-NS_IMETHODIMP EphySidebar::GetClassDescription(char * *aClassDescription)
-{
- *aClassDescription = nsCRT::strdup("Sidebar");
- return NS_OK;
-}
-
-/* readonly attribute nsCIDPtr classID; */
-NS_IMETHODIMP EphySidebar::GetClassID(nsCID * *aClassID)
-{
- *aClassID = nsnull;
- return NS_OK;
-}
-
-/* readonly attribute PRUint32 implementationLanguage; */
-NS_IMETHODIMP EphySidebar::GetImplementationLanguage(PRUint32 *aImplementationLanguage)
-{
- *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS;
- return NS_OK;
-}
-
-/* readonly attribute PRUint32 flags; */
-NS_IMETHODIMP EphySidebar::GetFlags(PRUint32 *aFlags)
-{
- *aFlags = nsIClassInfo::DOM_OBJECT;
- return NS_OK;
-}
-
-/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */
-NS_IMETHODIMP EphySidebar::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc)
-{
- return NS_ERROR_NOT_AVAILABLE;
-}