зеркало из https://github.com/mozilla/pjs.git
Hooking up xpinstall to the viewer. This will cause a new instance of the
xpinstall to be created when the viewer launches. This will be removed (along with the startup of silentdl) once we have a way of starting up components less intrusive. nsViewer.cpp - Added CreateInstance and related code to start component makefile.win - Added new include path
This commit is contained in:
Родитель
bd92244027
Коммит
5ec1eeb367
|
@ -69,6 +69,7 @@ LINCS= \
|
|||
-I$(PUBLIC)\intl \
|
||||
-I$(PUBLIC)\rdf \
|
||||
-I$(PUBLIC)\silentdl \
|
||||
-I$(PUBLIC)\xpinstall \
|
||||
-I$(PUBLIC)\wallet \
|
||||
-I$(PUBLIC)\profile \
|
||||
!if defined(NGPREFS)
|
||||
|
|
|
@ -82,6 +82,18 @@ static NS_DEFINE_IID(kISilentDownloadIID, NS_IDOMSILENTDOWNLOAD_IID);
|
|||
static NS_DEFINE_IID(kSilentDownloadCID, NS_SilentDownload_CID);
|
||||
/*********************************************/
|
||||
|
||||
/*********************************************
|
||||
SoftwareUpdate
|
||||
*********************************************/
|
||||
#include "nsISoftwareUpdate.h"
|
||||
#include "nsSoftwareUpdateIIDs.h"
|
||||
|
||||
static nsISoftwareUpdate *softwareUpdate= NULL;
|
||||
static NS_DEFINE_IID(kISoftwareUpdateIID, NS_ISOFTWAREUPDATE_IID);
|
||||
static NS_DEFINE_IID(kSoftwareUpdateCID, NS_SoftwareUpdate_CID);
|
||||
/*********************************************/
|
||||
|
||||
|
||||
extern nsresult NS_NewBrowserWindowFactory(nsIFactory** aFactory);
|
||||
extern nsresult NS_NewXPBaseWindowFactory(nsIFactory** aFactory);
|
||||
extern "C" void NS_SetupRegistry();
|
||||
|
@ -284,17 +296,17 @@ nsViewerApp::Initialize(int argc, char** argv)
|
|||
return rv;
|
||||
}
|
||||
|
||||
// XXX silent download
|
||||
|
||||
rv = nsComponentManager::CreateInstance(kSoftwareUpdateCID,
|
||||
nsnull,
|
||||
kISoftwareUpdateIID,
|
||||
(void**) &softwareUpdate);
|
||||
|
||||
|
||||
rv = nsComponentManager::CreateInstance(kSilentDownloadCID,
|
||||
nsnull,
|
||||
kISilentDownloadIID,
|
||||
(void**) &silentDownload);
|
||||
if (rv == NS_OK) {
|
||||
if (silentDownload->Startup() != NS_OK) {
|
||||
silentDownload->Shutdown();
|
||||
NS_RELEASE(silentDownload);
|
||||
}
|
||||
}
|
||||
|
||||
// Finally process our arguments
|
||||
rv = ProcessArguments(argc, argv);
|
||||
|
@ -306,11 +318,12 @@ nsViewerApp::Initialize(int argc, char** argv)
|
|||
nsresult
|
||||
nsViewerApp::Exit()
|
||||
{
|
||||
if (silentDownload != NULL)
|
||||
{
|
||||
silentDownload->Shutdown();
|
||||
if (silentDownload != nsnull)
|
||||
NS_RELEASE(silentDownload);
|
||||
}
|
||||
|
||||
if (softwareUpdate!= nsnull)
|
||||
NS_RELEASE(softwareUpdate);
|
||||
|
||||
|
||||
Destroy();
|
||||
mAppShell->Exit();
|
||||
|
|
Загрузка…
Ссылка в новой задаче