aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-31 21:40:46 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-31 21:40:46 +0800
commite832fe15f66ebacd3e624bc93c7ef8111f061829 (patch)
tree218369f9a4525decb6cd603b2b2d3caec8fd2baa /embed
parent1a020228feaff5cb89eae4ffa212ad94277fada2 (diff)
downloadgsoc2013-epiphany-e832fe15f66ebacd3e624bc93c7ef8111f061829.tar
gsoc2013-epiphany-e832fe15f66ebacd3e624bc93c7ef8111f061829.tar.gz
gsoc2013-epiphany-e832fe15f66ebacd3e624bc93c7ef8111f061829.tar.bz2
gsoc2013-epiphany-e832fe15f66ebacd3e624bc93c7ef8111f061829.tar.lz
gsoc2013-epiphany-e832fe15f66ebacd3e624bc93c7ef8111f061829.tar.xz
gsoc2013-epiphany-e832fe15f66ebacd3e624bc93c7ef8111f061829.tar.zst
gsoc2013-epiphany-e832fe15f66ebacd3e624bc93c7ef8111f061829.zip
R data/conspiracy.xhtml: R data/epiphany.html: R
2004-12-31 Christian Persch <chpe@cvs.gnome.org> * data/Makefile.am: R data/conspiracy.xhtml: R data/epiphany.html: R embed/mozilla/EphyAboutRedirector.cpp: R embed/mozilla/EphyAboutRedirector.h: * embed/mozilla/Makefile.am: * embed/mozilla/MozRegisterComponents.cpp: Remove about: redirections.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyAboutRedirector.cpp115
-rw-r--r--embed/mozilla/EphyAboutRedirector.h75
-rw-r--r--embed/mozilla/Makefile.am2
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp20
4 files changed, 0 insertions, 212 deletions
diff --git a/embed/mozilla/EphyAboutRedirector.cpp b/embed/mozilla/EphyAboutRedirector.cpp
deleted file mode 100644
index 54a602673..000000000
--- a/embed/mozilla/EphyAboutRedirector.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Gagan Saksena (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- * $Id$
- */
-
-#include "mozilla-config.h"
-
-#include "config.h"
-
-#include "EphyAboutRedirector.h"
-
-#include <nsNetCID.h>
-#include <nsIIOService.h>
-#include <nsIServiceManager.h>
-#include <nsCOMPtr.h>
-#include <nsIURI.h>
-#define MOZILLA_STRICT_API
-#include <nsEmbedString.h>
-#undef MOZILLA_STRICT_API
-
-static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
-
-NS_IMPL_ISUPPORTS1(EphyAboutRedirector, nsIAboutModule)
-
-struct RedirEntry {
- const char* id;
- const char* url;
-};
-
-static RedirEntry kRedirMap[] = {
- { "epiphany", "file://" SHARE_DIR "/epiphany.xhtml" },
- { "conspiracy", "file://" SHARE_DIR "/conspiracy.xhtml" },
- { "marco", "http://mpgritti.oltrelinux.com" }
-};
-static const int kRedirTotal = sizeof(kRedirMap)/sizeof(*kRedirMap);
-
-NS_IMETHODIMP
-EphyAboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result)
-{
- NS_ENSURE_ARG(aURI);
- nsEmbedCString path;
- (void)aURI->GetPath(path);
-
- nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID));
- NS_ENSURE_TRUE (ioService, NS_ERROR_FAILURE);
-
- for (int i = 0; i< kRedirTotal; i++)
- {
- if (strcmp(path.get(), kRedirMap[i].id) == 0)
- {
- nsCOMPtr<nsIChannel> tempChannel;
- ioService->NewChannel(nsEmbedCString(kRedirMap[i].url),
- nsnull, nsnull, getter_AddRefs(tempChannel));
- NS_ENSURE_TRUE (tempChannel, NS_ERROR_FAILURE);
-
- tempChannel->SetOriginalURI(aURI);
-
- *result = tempChannel.get();
- NS_ADDREF(*result);
-
- return NS_OK;
- }
- }
-
- NS_ASSERTION(0, "EphyAboutRedirector called for unknown case");
- return NS_ERROR_ILLEGAL_VALUE;
-}
-
-NS_METHOD
-EphyAboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
-{
- EphyAboutRedirector* about = new EphyAboutRedirector();
- if (about == nsnull)
- return NS_ERROR_OUT_OF_MEMORY;
- NS_ADDREF(about);
- nsresult rv = about->QueryInterface(aIID, aResult);
- NS_RELEASE(about);
- return rv;
-}
diff --git a/embed/mozilla/EphyAboutRedirector.h b/embed/mozilla/EphyAboutRedirector.h
deleted file mode 100644
index ed970c862..000000000
--- a/embed/mozilla/EphyAboutRedirector.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Gagan Saksena (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- *
- * $Id$
- */
-
-#ifndef EphyAboutRedirector_h__
-#define EphyAboutRedirector_h__
-
-#include <nsIAboutModule.h>
-
-class EphyAboutRedirector : public nsIAboutModule
-{
-public:
- NS_DECL_ISUPPORTS
-
- NS_DECL_NSIABOUTMODULE
-
- EphyAboutRedirector() {}
- virtual ~EphyAboutRedirector() {}
-
- static NS_METHOD
- Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
-
-protected:
-};
-#define EPHY_ABOUT_REDIRECTOR_CID \
-{ /* f5314c66-b6f6-49b0-bfd0-52f69545afb7 */ \
- 0xf5314c66, \
- 0xb6f6, \
- 0x49b0, \
- {0xbf, 0xd0, 0x52, 0xf6, 0x94, 0x45, 0xaf, 0xb7} \
-}
-
-#define EPHY_ABOUT_REDIRECTOR_EPIPHANY_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "epiphany"
-#define EPHY_ABOUT_REDIRECTOR_CONSPIRACY_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "conspiracy"
-#define EPHY_ABOUT_REDIRECTOR_MARCO_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "marco"
-#define EPHY_ABOUT_REDIRECTOR_CLASSNAME "Epiphany's about redirector"
-
-#endif // EphyAboutRedirector_h__
diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am
index db227c1e2..5c4b96ed1 100644
--- a/embed/mozilla/Makefile.am
+++ b/embed/mozilla/Makefile.am
@@ -3,8 +3,6 @@ noinst_LTLIBRARIES = libephymozillaembed.la
libephymozillaembed_la_SOURCES = \
ContentHandler.cpp \
ContentHandler.h \
- EphyAboutRedirector.cpp \
- EphyAboutRedirector.h \
EphyContentPolicy.cpp \
EphyContentPolicy.h \
EphyHeaderSniffer.cpp \
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp
index aac33b00e..5cebf9f38 100644
--- a/embed/mozilla/MozRegisterComponents.cpp
+++ b/embed/mozilla/MozRegisterComponents.cpp
@@ -27,7 +27,6 @@
#include "GlobalHistory.h"
#include "PrintingPromptService.h"
#include "MozDownload.h"
-#include "EphyAboutRedirector.h"
#include "EphyContentPolicy.h"
#ifdef ENABLE_FILEPICKER
@@ -51,7 +50,6 @@
#include <glib/gmessages.h>
-NS_GENERIC_FACTORY_CONSTRUCTOR(EphyAboutRedirector)
NS_GENERIC_FACTORY_CONSTRUCTOR(MozDownload)
NS_GENERIC_FACTORY_CONSTRUCTOR(GContentHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(MozGlobalHistory)
@@ -148,24 +146,6 @@ static const nsModuleComponentInfo sAppComps[] = {
GPrintingPromptServiceConstructor
},
{
- EPHY_ABOUT_REDIRECTOR_CLASSNAME,
- EPHY_ABOUT_REDIRECTOR_CID,
- EPHY_ABOUT_REDIRECTOR_EPIPHANY_CONTRACTID,
- EphyAboutRedirectorConstructor
- },
- {
- EPHY_ABOUT_REDIRECTOR_CLASSNAME,
- EPHY_ABOUT_REDIRECTOR_CID,
- EPHY_ABOUT_REDIRECTOR_CONSPIRACY_CONTRACTID,
- EphyAboutRedirectorConstructor
- },
- {
- EPHY_ABOUT_REDIRECTOR_CLASSNAME,
- EPHY_ABOUT_REDIRECTOR_CID,
- EPHY_ABOUT_REDIRECTOR_MARCO_CONTRACTID,
- EphyAboutRedirectorConstructor
- },
- {
EPHY_CONTENT_POLICY_CLASSNAME,
EPHY_CONTENT_POLICY_CID,
EPHY_CONTENT_POLICY_CONTRACTID,