Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-01-29 19:41:15 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-01-29 19:41:15 (GMT)
commit4016f12d866e93cc5f7c7ff86fe6594cde473271 (patch)
tree73dae0b90719cab2cd31fe0c7ed8a3452faa4349 /lib
parentd4fab7fc6463a59cbb394390cd2b6443447627cc (diff)
Indentation stuff
Diffstat (limited to 'lib')
-rw-r--r--lib/src/GeckoContentHandler.cpp64
-rw-r--r--lib/src/GeckoDownload.cpp57
-rw-r--r--lib/src/sugar-browser.cpp26
3 files changed, 75 insertions, 72 deletions
diff --git a/lib/src/GeckoContentHandler.cpp b/lib/src/GeckoContentHandler.cpp
index 3eb70fd..c3785cf 100644
--- a/lib/src/GeckoContentHandler.cpp
+++ b/lib/src/GeckoContentHandler.cpp
@@ -6,15 +6,12 @@
class GeckoContentHandler : public nsIHelperAppLauncherDialog
{
- public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIHELPERAPPLAUNCHERDIALOG
-
- GeckoContentHandler();
- virtual ~GeckoContentHandler();
-
- private:
+public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIHELPERAPPLAUNCHERDIALOG
+ GeckoContentHandler();
+ virtual ~GeckoContentHandler();
};
GeckoContentHandler::GeckoContentHandler()
@@ -75,42 +72,47 @@ GeckoContentHandlerFactory::GeckoContentHandlerFactory() {
GeckoContentHandlerFactory::~GeckoContentHandlerFactory() {
}
-NS_IMETHODIMP GeckoContentHandlerFactory::CreateInstance(nsISupports *aOuter, const nsIID & aIID, void **aResult)
+NS_IMETHODIMP
+GeckoContentHandlerFactory::CreateInstance(nsISupports *aOuter,
+ const nsIID & aIID,
+ void **aResult)
{
- NS_ENSURE_ARG_POINTER(aResult);
+ NS_ENSURE_ARG_POINTER(aResult);
- *aResult = NULL;
- GeckoContentHandler *inst = new GeckoContentHandler;
- if (!inst)
- return NS_ERROR_OUT_OF_MEMORY;
+ *aResult = NULL;
+ GeckoContentHandler *inst = new GeckoContentHandler;
+ if (!inst)
+ return NS_ERROR_OUT_OF_MEMORY;
- nsresult rv = inst->QueryInterface(aIID, aResult);
- if (rv != NS_OK) {
- // We didn't get the right interface, so clean up
- delete inst;
- }
+ nsresult rv = inst->QueryInterface(aIID, aResult);
+ if (rv != NS_OK) {
+ // We didn't get the right interface, so clean up
+ delete inst;
+ }
- return rv;
+ return rv;
}
-NS_IMETHODIMP GeckoContentHandlerFactory::LockFactory(PRBool lock)
+NS_IMETHODIMP
+GeckoContentHandlerFactory::LockFactory(PRBool lock)
{
- return NS_OK;
+ return NS_OK;
}
//*****************************************************************************
-nsresult NS_NewGeckoContentHandlerFactory(nsIFactory** aFactory)
+nsresult
+NS_NewGeckoContentHandlerFactory(nsIFactory** aFactory)
{
- NS_ENSURE_ARG_POINTER(aFactory);
- *aFactory = nsnull;
+ NS_ENSURE_ARG_POINTER(aFactory);
+ *aFactory = nsnull;
- GeckoContentHandlerFactory *result = new GeckoContentHandlerFactory;
- if (!result)
- return NS_ERROR_OUT_OF_MEMORY;
+ GeckoContentHandlerFactory *result = new GeckoContentHandlerFactory;
+ if (!result)
+ return NS_ERROR_OUT_OF_MEMORY;
- NS_ADDREF(result);
- *aFactory = result;
+ NS_ADDREF(result);
+ *aFactory = result;
- return NS_OK;
+ return NS_OK;
}
diff --git a/lib/src/GeckoDownload.cpp b/lib/src/GeckoDownload.cpp
index c1b8aef..479c1c5 100644
--- a/lib/src/GeckoDownload.cpp
+++ b/lib/src/GeckoDownload.cpp
@@ -153,11 +153,11 @@ GeckoDownload::OnSecurityChange (nsIWebProgress *aWebProgress,
class GeckoDownloadFactory : public nsIFactory {
public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIFACTORY
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIFACTORY
- GeckoDownloadFactory();
- virtual ~GeckoDownloadFactory();
+ GeckoDownloadFactory();
+ virtual ~GeckoDownloadFactory();
};
//*****************************************************************************
@@ -170,42 +170,45 @@ GeckoDownloadFactory::GeckoDownloadFactory() {
GeckoDownloadFactory::~GeckoDownloadFactory() {
}
-NS_IMETHODIMP GeckoDownloadFactory::CreateInstance(nsISupports *aOuter, const nsIID & aIID, void **aResult)
+NS_IMETHODIMP
+GeckoDownloadFactory::CreateInstance(nsISupports *aOuter, const nsIID & aIID, void **aResult)
{
- NS_ENSURE_ARG_POINTER(aResult);
+ NS_ENSURE_ARG_POINTER(aResult);
- *aResult = NULL;
- GeckoDownload *inst = new GeckoDownload;
- if (!inst)
- return NS_ERROR_OUT_OF_MEMORY;
+ *aResult = NULL;
+ GeckoDownload *inst = new GeckoDownload;
+ if (!inst)
+ return NS_ERROR_OUT_OF_MEMORY;
- nsresult rv = inst->QueryInterface(aIID, aResult);
- if (rv != NS_OK) {
- // We didn't get the right interface, so clean up
- delete inst;
- }
+ nsresult rv = inst->QueryInterface(aIID, aResult);
+ if (rv != NS_OK) {
+ // We didn't get the right interface, so clean up
+ delete inst;
+ }
- return rv;
+ return rv;
}
-NS_IMETHODIMP GeckoDownloadFactory::LockFactory(PRBool lock)
+NS_IMETHODIMP
+GeckoDownloadFactory::LockFactory(PRBool lock)
{
- return NS_OK;
+ return NS_OK;
}
//*****************************************************************************
-nsresult NS_NewGeckoDownloadFactory(nsIFactory** aFactory)
+nsresult
+NS_NewGeckoDownloadFactory(nsIFactory** aFactory)
{
- NS_ENSURE_ARG_POINTER(aFactory);
- *aFactory = nsnull;
+ NS_ENSURE_ARG_POINTER(aFactory);
+ *aFactory = nsnull;
- GeckoDownloadFactory *result = new GeckoDownloadFactory;
- if (!result)
- return NS_ERROR_OUT_OF_MEMORY;
+ GeckoDownloadFactory *result = new GeckoDownloadFactory;
+ if (!result)
+ return NS_ERROR_OUT_OF_MEMORY;
- NS_ADDREF(result);
- *aFactory = result;
+ NS_ADDREF(result);
+ *aFactory = result;
- return NS_OK;
+ return NS_OK;
}
diff --git a/lib/src/sugar-browser.cpp b/lib/src/sugar-browser.cpp
index 5cc1ba9..b4ac858 100644
--- a/lib/src/sugar-browser.cpp
+++ b/lib/src/sugar-browser.cpp
@@ -116,23 +116,23 @@ sugar_browser_startup(const char *profile_path, const char *profile_name)
NS_GetComponentRegistrar(getter_AddRefs(componentRegistrar));
NS_ENSURE_TRUE (componentRegistrar, FALSE);
- nsCOMPtr<nsIFactory> contentHandlerFactory;
- rv = NS_NewGeckoContentHandlerFactory(getter_AddRefs(contentHandlerFactory));
- rv = componentRegistrar->RegisterFactory(sSugarComponents[0].mCID,
- sSugarComponents[0].mDescription,
- sSugarComponents[0].mContractID,
- contentHandlerFactory);
+ nsCOMPtr<nsIFactory> contentHandlerFactory;
+ rv = NS_NewGeckoContentHandlerFactory(getter_AddRefs(contentHandlerFactory));
+ rv = componentRegistrar->RegisterFactory(sSugarComponents[0].mCID,
+ sSugarComponents[0].mDescription,
+ sSugarComponents[0].mContractID,
+ contentHandlerFactory);
if (NS_FAILED(rv)) {
g_warning ("Failed to register factory for %s\n", sSugarComponents[0].mDescription);
return FALSE;
}
- nsCOMPtr<nsIFactory> downloadFactory;
- rv = NS_NewGeckoDownloadFactory(getter_AddRefs(downloadFactory));
- rv = componentRegistrar->RegisterFactory(sSugarComponents[1].mCID,
- sSugarComponents[1].mDescription,
- sSugarComponents[1].mContractID,
- downloadFactory);
+ nsCOMPtr<nsIFactory> downloadFactory;
+ rv = NS_NewGeckoDownloadFactory(getter_AddRefs(downloadFactory));
+ rv = componentRegistrar->RegisterFactory(sSugarComponents[1].mCID,
+ sSugarComponents[1].mDescription,
+ sSugarComponents[1].mContractID,
+ downloadFactory);
if (NS_FAILED(rv)) {
g_warning ("Failed to register factory for %s\n", sSugarComponents[1].mDescription);
return FALSE;
@@ -372,7 +372,6 @@ sugar_browser_scroll_pixels(SugarBrowser *browser,
int dx,
int dy)
{
-#ifndef HAVE_GECKO_1_9
nsCOMPtr<nsIWebBrowser> webBrowser;
gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED(browser),
getter_AddRefs(webBrowser));
@@ -390,7 +389,6 @@ sugar_browser_scroll_pixels(SugarBrowser *browser,
NS_ENSURE_TRUE (DOMWindow, );
DOMWindow->ScrollBy (dx, dy);
-#endif
}
void