diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-11-24 07:27:37 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-11-24 07:27:37 +0800 |
commit | 876084efe77d9aa633b3ec4aad7910ad27f68ffd (patch) | |
tree | 0624df6348225b3b7a000d51921433283cd67472 /embed/mozilla/ExternalProtocolHandlers.h | |
parent | 32cffc77d9fb08dd41e76f00fb4be7a47483c0e2 (diff) | |
download | gsoc2013-epiphany-876084efe77d9aa633b3ec4aad7910ad27f68ffd.tar gsoc2013-epiphany-876084efe77d9aa633b3ec4aad7910ad27f68ffd.tar.gz gsoc2013-epiphany-876084efe77d9aa633b3ec4aad7910ad27f68ffd.tar.bz2 gsoc2013-epiphany-876084efe77d9aa633b3ec4aad7910ad27f68ffd.tar.lz gsoc2013-epiphany-876084efe77d9aa633b3ec4aad7910ad27f68ffd.tar.xz gsoc2013-epiphany-876084efe77d9aa633b3ec4aad7910ad27f68ffd.tar.zst gsoc2013-epiphany-876084efe77d9aa633b3ec4aad7910ad27f68ffd.zip |
Remove.
2003-11-24 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/BaseProtocolContentHandler.cpp:
* embed/mozilla/BaseProtocolContentHandler.h:
* embed/mozilla/BaseProtocolHandler.cpp:
* embed/mozilla/BaseProtocolHandler.h:
Remove.
* embed/mozilla/ExternalProtocolHandlers.cpp:
* embed/mozilla/ExternalProtocolHandlers.h:
Merge base implementations here. No need
of using 200 files for a work around of
mozilla problems ;)
* embed/mozilla/Makefile.am:
* embed/mozilla/MozRegisterComponents.cpp:
Use ftp CID directly from mozilla headers
instead of doing a copy of it in ours.
Diffstat (limited to 'embed/mozilla/ExternalProtocolHandlers.h')
-rw-r--r-- | embed/mozilla/ExternalProtocolHandlers.h | 52 |
1 files changed, 42 insertions, 10 deletions
diff --git a/embed/mozilla/ExternalProtocolHandlers.h b/embed/mozilla/ExternalProtocolHandlers.h index e2a47ef13..7ff6e275b 100644 --- a/embed/mozilla/ExternalProtocolHandlers.h +++ b/embed/mozilla/ExternalProtocolHandlers.h @@ -16,13 +16,54 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We are registering protocol handlers for news, mailto and irc + because mozilla load all modules on startup, so if you have these + components installed it will try to use them as protocol handlers. + Our implementation just forward to external protocol service. + Ftp is a special case, it can be handled by mozilla but we + want to use an external client when one is configured in GNOME + handlers. + IMPORTANT: there is no need to register handlers for other protocols + here. Once they are configured in GNOME, they will just work. +*/ + #ifndef EXTERNAL_PROTOCOL_HANDLERS #define EXTERNAL_PROTOCOL_HANDLERS #include "nsError.h" -#include "BaseProtocolContentHandler.h" +#include "nsIContentHandler.h" #include "nsIProtocolHandler.h" #include "nsCURILoader.h" +#include "nsString.h" + +class GBaseProtocolHandler : public nsIProtocolHandler +{ + public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROTOCOLHANDLER + + GBaseProtocolHandler (const char *aScheme); + virtual ~GBaseProtocolHandler(); + /* additional members */ + protected: + nsCString mScheme; +}; + +class GBaseProtocolContentHandler : public GBaseProtocolHandler, + public nsIContentHandler +{ + public: + NS_DECL_ISUPPORTS + NS_DECL_NSICONTENTHANDLER + + NS_IMETHODIMP NewChannel(nsIURI *aURI, nsIChannel **_retval); + + GBaseProtocolContentHandler (const char *aScheme); + virtual ~GBaseProtocolContentHandler(); + /* additional members */ + protected: + nsCString mMimeType; +}; #define G_IRC_PROTOCOL_CID \ { /* aabe33d3-7455-4d8f-87e7-43e4541ace4e */ \ @@ -59,15 +100,6 @@ class GIRCProtocolHandler : public GBaseProtocolContentHandler "application-x-gnome-ftp" #define G_FTP_CONTENT_CLASSNAME "Epiphany's FTP Content Handler" -#define NS_FTPPROTOCOLHANDLER_CID \ -{ \ - 0x25029490, \ - 0xf132, \ - 0x11d2, \ - {0x95, 0x88, 0x0, 0x80, 0x5f, 0x36, 0x9f, 0x95} \ -} -#define NS_FTPPROTOCOLHANDLER_CLASSNAME "The FTP Protocol Handler" - class GFtpProtocolHandler : public GBaseProtocolContentHandler { public: |