зеркало из https://github.com/mozilla/gecko-dev.git
Mozilla lives!
This commit is contained in:
Родитель
09dea87f66
Коммит
a058f8b3b4
|
@ -39,6 +39,7 @@ CPPSRCS = \
|
|||
nsAboutBlank.cpp \
|
||||
nsAboutBloat.cpp \
|
||||
nsAboutCredits.cpp \
|
||||
mzAboutMozilla.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
|
||||
|
|
|
@ -38,6 +38,7 @@ CPP_OBJS= \
|
|||
.\$(OBJDIR)\nsAboutBlank.obj \
|
||||
.\$(OBJDIR)\nsAboutBloat.obj \
|
||||
.\$(OBJDIR)\nsAboutCredits.obj \
|
||||
.\$(OBJDIR)\mzAboutMozilla.obj \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_INCLUDES=-I.
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* 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 Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "mzAboutMozilla.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIURI.h"
|
||||
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS(mzAboutMozilla, NS_GET_IID(nsIAboutModule));
|
||||
|
||||
static const char kCreditsPage[] = "chrome://global/content/mozilla.html";
|
||||
|
||||
NS_IMETHODIMP
|
||||
mzAboutMozilla::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
{
|
||||
nsresult rv;
|
||||
NS_WITH_SERVICE(nsIIOService, ioService, kIOServiceCID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
rv = ioService->NewChannel(kCreditsPage, nsnull, result);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
mzAboutMozilla::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
mzAboutMozilla* about = new mzAboutMozilla();
|
||||
if (about == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(about);
|
||||
nsresult rv = about->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(about);
|
||||
return rv;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
|
@ -0,0 +1,53 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* 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 Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Sammy Ford
|
||||
*/
|
||||
|
||||
#ifndef mzAboutMozilla_h__
|
||||
#define mzAboutMozilla_h__
|
||||
|
||||
#include "nsIAboutModule.h"
|
||||
|
||||
class mzAboutMozilla : public nsIAboutModule
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_DECL_NSIABOUTMODULE
|
||||
|
||||
mzAboutMozilla() { NS_INIT_REFCNT(); }
|
||||
virtual ~mzAboutMozilla() {}
|
||||
|
||||
static NS_METHOD
|
||||
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#define MZ_ABOUT_MOZILLA_MODULE_CID \
|
||||
{ /* 15f25270-1dd2-11b2-ae92-970d00af4e34*/ \
|
||||
0x15f25270, \
|
||||
0x1dd2, \
|
||||
0x11b2, \
|
||||
{0xae, 0x92, 0x97, 0x0d, 0x00, 0xaf, 0x4e, 0x34} \
|
||||
}
|
||||
|
||||
#endif // mzAboutMozilla_h__
|
|
@ -27,6 +27,7 @@
|
|||
#include "nsAboutBlank.h"
|
||||
#include "nsAboutBloat.h"
|
||||
#include "nsAboutCredits.h"
|
||||
#include "mzAboutMozilla.h"
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
|
@ -53,6 +54,12 @@ static nsModuleComponentInfo components[] =
|
|||
NS_ABOUT_MODULE_PROGID_PREFIX "credits",
|
||||
nsAboutCredits::Create
|
||||
},
|
||||
|
||||
{ "about:mozilla",
|
||||
MZ_ABOUT_MOZILLA_MODULE_CID,
|
||||
NS_ABOUT_MODULE_PROGID_PREFIX "mozilla",
|
||||
mzAboutMozilla::Create
|
||||
},
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("nsAboutProtocolModule", components);
|
||||
|
|
Загрузка…
Ссылка в новой задаче