This commit is contained in:
law%netscape.com 1999-09-14 22:42:49 +00:00
Родитель 57e13eb1a7
Коммит 7ae1d728f3
11 изменённых файлов: 0 добавлений и 2987 удалений

Просмотреть файл

@ -1,48 +0,0 @@
interface BrowserAppCore : BaseAppCore
{
/* IID: { 0xb0ffb697, 0xbab4, 0x11d2, \
{0x96, 0xc4, 0x0, 0x60, 0xb0, 0xfb, 0x99, 0x56}} */
void BrowserAppCore();
void back();
void forward();
/* XXXbe reloadType must be unsigned long to match nsIChannel.idl's
nsLoadFlags typedef; pls. fix by converting this interface
from DOM IDL to XPIDL */
void reload(in unsigned long reloadType);
void stop();
void loadUrl(in wstring url);
void loadInitialPage();
void backButtonPopup();
void forwardButtonPopup();
void gotoHistoryIndex(in int index);
void walletPreview(in Window win, in Window form);
void cookieViewer(in Window win);
void signonViewer(in Window win);
void walletEditor(in Window win);
void walletChangePassword();
void walletQuickFillin(in Window win);
void walletRequestToCapture(in Window win);
void walletSamples();
void setToolbarWindow(in Window win);
void setContentWindow(in Window win);
void setWebShellWindow(in Window win);
void newWindow();
void openWindow();
void printPreview();
void copy();
void print();
void close();
void exit();
void selectAll();
void find();
void findNext();
};

Просмотреть файл

@ -31,7 +31,6 @@ DEPTH=..\..\..
IDLSRCS= \
AppCoresManager.idl \
BaseAppCore.idl \
BrowserAppCore.idl \
ProfileCore.idl \
ToolkitCore.idl
!endif

Двоичные данные
xpfe/AppCores/macbuild/AppCores.mcp

Двоичный файл не отображается.

Просмотреть файл

@ -37,10 +37,8 @@ CPPSRCS= \
nsProfileCore.cpp \
nsAppCoresNameSet.cpp \
nsToolkitCore.cpp \
nsBrowserAppCore.cpp \
nsProfileCoreFactory.cpp \
nsToolkitCoreFactory.cpp \
nsBrowserAppCoreFactory.cpp \
nsAppCoresManager.cpp \
nsAppCoresManagerFactory.cpp \
nsJSBaseAppCore.cpp \

Просмотреть файл

@ -79,16 +79,13 @@ OBJS = \
.\$(OBJDIR)\nsAppCoresNameSet.obj \
.\$(OBJDIR)\nsToolkitCore.obj \
.\$(OBJDIR)\nsToolkitCoreFactory.obj \
.\$(OBJDIR)\nsBrowserAppCore.obj \
.\$(OBJDIR)\nsProfileCoreFactory.obj \
.\$(OBJDIR)\nsBrowserAppCoreFactory.obj \
.\$(OBJDIR)\nsAppCoresManager.obj \
.\$(OBJDIR)\nsAppCoresManagerFactory.obj \
.\$(OBJDIR)\nsJSBaseAppCore.obj \
.\$(OBJDIR)\nsJSAppCoresManager.obj \
.\$(OBJDIR)\nsJSProfileCore.obj \
.\$(OBJDIR)\nsJSToolkitCore.obj \
.\$(OBJDIR)\nsJSBrowserAppCore.obj \
.\$(OBJDIR)\nsAppCores.obj \
$(NULL)

Просмотреть файл

@ -22,7 +22,6 @@
#include "nsAppCoresCIDs.h"
#include "nsAppCoresManagerFactory.h"
#include "nsProfileCoreFactory.h"
#include "nsBrowserAppCoreFactory.h"
#include "nsToolkitCoreFactory.h"
#include "nsIFactory.h"
#include "nsIComponentManager.h"
@ -36,7 +35,6 @@ static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
static NS_DEFINE_IID(kProfileCoreCID, NS_PROFILECORE_CID);
static NS_DEFINE_IID(kToolkitCoreCID, NS_TOOLKITCORE_CID);
static NS_DEFINE_IID(kBrowserAppCoreCID, NS_BROWSERAPPCORE_CID);
static NS_DEFINE_IID(kAppCoresManagerCID, NS_APPCORESMANAGER_CID);
@ -57,7 +55,6 @@ NSRegisterSelf(nsISupports* serviceMgr, const char *path)
nsComponentManager::RegisterComponent(kAppCoresManagerCID, NULL, NULL, path, PR_TRUE, PR_TRUE);
nsComponentManager::RegisterComponent(kProfileCoreCID, NULL, NULL, path, PR_TRUE, PR_TRUE);
nsComponentManager::RegisterComponent(kToolkitCoreCID, NULL, NULL, path, PR_TRUE, PR_TRUE);
nsComponentManager::RegisterComponent(kBrowserAppCoreCID, NULL, NULL, path, PR_TRUE, PR_TRUE);
return NS_OK;
}
@ -70,7 +67,6 @@ NSUnregisterSelf(nsISupports* serviceMgr, const char *path)
nsComponentManager::UnregisterComponent(kAppCoresManagerCID, path);
nsComponentManager::UnregisterComponent(kProfileCoreCID, path);
nsComponentManager::UnregisterComponent(kToolkitCoreCID, path);
nsComponentManager::UnregisterComponent(kBrowserAppCoreCID, path);
return NS_OK;
}
@ -104,10 +100,6 @@ NSGetFactory(nsISupports* serviceMgr,
{
inst = new nsToolkitCoreFactory();
}
else if ( aClass.Equals(kBrowserAppCoreCID) )
{
inst = new nsBrowserAppCoreFactory();
}
else
{
return NS_ERROR_ILLEGAL_VALUE;

Просмотреть файл

@ -35,7 +35,6 @@ static NS_DEFINE_IID(kIScriptExternalNameSetIID, NS_ISCRIPTEXTERNALNAMESET_IID);
static NS_DEFINE_IID(kAppCoresCID, NS_APPCORESMANAGER_CID);
static NS_DEFINE_IID(kToolkitCoreCID, NS_TOOLKITCORE_CID);
static NS_DEFINE_IID(kProfileCoreCID, NS_PROFILECORE_CID);
static NS_DEFINE_IID(kBrowserAppCoreCID, NS_BROWSERAPPCORE_CID);
nsAppCoresNameSet::nsAppCoresNameSet()
{
@ -60,7 +59,6 @@ nsAppCoresNameSet::InitializeClasses(nsIScriptContext* aScriptContext)
if (NS_OK != result) return result;
result = NS_InitProfileCoreClass(aScriptContext, nsnull);
result = NS_InitBrowserAppCoreClass(aScriptContext, nsnull);
result = NS_InitToolkitCoreClass(aScriptContext, nsnull);
return result;
@ -90,12 +88,6 @@ nsAppCoresNameSet::AddNameSet(nsIScriptContext* aScriptContext)
if (NS_OK != result) return result;
result = manager->RegisterGlobalName("BrowserAppCore",
kBrowserAppCoreCID,
PR_TRUE);
if (NS_OK != result) return result;
result = manager->RegisterGlobalName("XPAppCoresManager",
kAppCoresCID,
PR_FALSE);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,207 +0,0 @@
/* -*- 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.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsBrowserAppCore_h___
#define nsBrowserAppCore_h___
//#include "nsAppCores.h"
#include "nscore.h"
#include "nsString.h"
#include "nsISupports.h"
#include "nsIDOMBrowserAppCore.h"
#include "nsBaseAppCore.h"
#include "nsIStreamObserver.h"
#include "nsIDocumentLoaderObserver.h"
#include "nsIObserver.h"
#include "nsISessionHistory.h"
class nsIBrowserWindow;
class nsIWebShell;
class nsIScriptContext;
class nsIDOMWindow;
class nsIURI;
class nsIWebShellWindow;
class nsIFindComponent;
#define SHISTORY_POPUP_LIST 10
////////////////////////////////////////////////////////////////////////////////
// nsBrowserAppCore:
////////////////////////////////////////////////////////////////////////////////
class nsBrowserAppCore : public nsBaseAppCore,
public nsIDOMBrowserAppCore,
// public nsIStreamObserver,
public nsIDocumentLoaderObserver,
public nsIObserver,
public nsISessionHistory
{
public:
nsBrowserAppCore();
virtual ~nsBrowserAppCore();
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetScriptObject(nsIScriptContext *aContext, void** aScriptObject);
NS_IMETHOD Init(const nsString& aId);
NS_IMETHOD GetId(nsString& aId) { return nsBaseAppCore::GetId(aId); }
NS_IMETHOD Back();
NS_IMETHOD Forward();
#ifdef NECKO
NS_IMETHOD Reload(nsLoadFlags aType);
#else
NS_IMETHOD Reload(PRInt32 aType);
#endif
NS_IMETHOD Stop();
NS_IMETHOD BackButtonPopup();
NS_IMETHOD ForwardButtonPopup();
NS_IMETHOD GotoHistoryIndex(PRInt32 aIndex);
NS_IMETHOD WalletPreview(nsIDOMWindow* aWin, nsIDOMWindow* aForm);
NS_IMETHOD SignonViewer(nsIDOMWindow* aWin);
NS_IMETHOD CookieViewer(nsIDOMWindow* aWin);
NS_IMETHOD WalletEditor(nsIDOMWindow* aWin);
NS_IMETHOD WalletChangePassword();
NS_IMETHOD WalletQuickFillin(nsIDOMWindow* aWin);
NS_IMETHOD WalletRequestToCapture(nsIDOMWindow* aWin);
NS_IMETHOD WalletSamples();
NS_IMETHOD LoadUrl(const nsString& aUrl);
NS_IMETHOD SetToolbarWindow(nsIDOMWindow* aWin);
NS_IMETHOD SetContentWindow(nsIDOMWindow* aWin);
NS_IMETHOD SetWebShellWindow(nsIDOMWindow* aWin);
NS_IMETHOD NewWindow();
NS_IMETHOD OpenWindow();
NS_IMETHOD PrintPreview();
NS_IMETHOD Print();
NS_IMETHOD Copy();
NS_IMETHOD Close();
NS_IMETHOD Exit();
NS_IMETHOD SelectAll();
NS_IMETHOD Find();
NS_IMETHOD FindNext();
NS_IMETHOD SetDocumentCharset(const nsString& aCharset);
NS_IMETHOD LoadInitialPage();
// nsIDocumentLoaderObserver
#ifdef NECKO
NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand);
NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, nsIDocumentLoaderObserver* aObserver);
NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsIContentViewer* aViewer);
NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, PRUint32 aProgress, PRUint32 aProgressMax);
NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsString& aMsg);
NS_IMETHOD OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus);
NS_IMETHOD HandleUnknownContentType(nsIDocumentLoader* loader, nsIChannel* channel, const char *aContentType,const char *aCommand );
#else
NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand);
NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIURI *aUrl, PRInt32 aStatus,
nsIDocumentLoaderObserver * aObserver);
NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aContentType,
nsIContentViewer* aViewer);
NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIURI* aURL, PRUint32 aProgress,
PRUint32 aProgressMax);
NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader* loader, nsIURI* aURL, nsString& aMsg);
NS_IMETHOD OnEndURLLoad(nsIDocumentLoader* loader, nsIURI* aURL, PRInt32 aStatus);
NS_IMETHOD HandleUnknownContentType(nsIDocumentLoader* loader,
nsIURI *aURL,
const char *aContentType,
const char *aCommand );
#endif
// nsIObserver
NS_DECL_NSIOBSERVER
// nsISessionHistory methods
NS_IMETHOD GoForward(nsIWebShell * aPrev);
NS_IMETHOD GoBack(nsIWebShell * aPrev);
#ifdef NECKO
NS_IMETHOD Reload(nsIWebShell * aPrev, nsLoadFlags aType);
#else
NS_IMETHOD Reload(nsIWebShell * aPrev, nsURLReloadType aType);
#endif /* NECKO */
NS_IMETHOD canForward(PRBool &aResult);
NS_IMETHOD canBack(PRBool &aResult);
NS_IMETHOD add(nsIWebShell * aWebShell);
NS_IMETHOD Goto(PRInt32 aHistoryIndex, nsIWebShell * aPrev, PRBool aIsReloading);
NS_IMETHOD getHistoryLength(PRInt32 & aResult);
NS_IMETHOD getCurrentIndex(PRInt32 & aResult);
// NS_IMETHOD cloneHistory(nsISessionHistory * aSessionHistory);
NS_IMETHOD SetLoadingFlag(PRBool aFlag);
NS_IMETHOD GetLoadingFlag(PRBool &aFlag);
NS_IMETHOD SetLoadingHistoryEntry(nsHistoryEntry * aHistoryEntry);
NS_IMETHOD GetURLForIndex(PRInt32 aIndex, const PRUnichar ** aURL);
NS_IMETHOD SetURLForIndex(PRInt32 aIndex, const PRUnichar * aURL);
NS_IMETHOD GetTitleForIndex(PRInt32 aIndex, const PRUnichar ** aTitle);
NS_IMETHOD SetTitleForIndex(PRInt32 aIndex, const PRUnichar * aTitle);
NS_IMETHOD GetHistoryObjectForIndex(PRInt32 aIndex, nsISupports ** aState);
NS_IMETHOD SetHistoryObjectForIndex(PRInt32 aIndex, nsISupports * aState);
protected:
NS_IMETHOD DoDialog();
NS_IMETHOD ExecuteScript(nsIScriptContext * aContext, const nsString& aScript);
void SetButtonImage(nsIDOMNode * aParentNode, PRInt32 aBtnNum, const nsString &aResName);
void InitializeSearch(nsIFindComponent*);
void BeginObserving();
void EndObserving();
NS_IMETHOD CreateMenuItem(nsIDOMNode * , PRInt32,const PRUnichar * );
NS_IMETHOD UpdateGoMenu();
NS_IMETHOD ClearHistoryPopup(nsIDOMNode * );
nsIScriptContext *mToolbarScriptContext; // weak reference
nsIScriptContext *mContentScriptContext; // weak reference
nsIDOMWindow *mToolbarWindow; // weak reference
nsIDOMWindow *mContentWindow; // weak reference
nsIWebShellWindow *mWebShellWin; // weak reference
nsIWebShell * mWebShell; // weak reference
nsIWebShell * mContentAreaWebShell; // weak reference
nsISessionHistory* mSHistory; // this is a service
nsCOMPtr<nsISupports> mSearchContext; // at last, something we really own
#ifdef DEBUG_warren
PRIntervalTime mLoadStartTime;
#endif
};
#endif // nsBrowserAppCore_h___

Просмотреть файл

@ -1,116 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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 Communicator client 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.
*/
#include "nsAppCores.h"
#include "nsBrowserAppCoreFactory.h"
#include "nsBrowserAppCore.h"
#include "pratom.h"
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
/////////////////////////////////////////////////////////////////////////
// nsBrowserAppCoreFactory
/////////////////////////////////////////////////////////////////////////
nsBrowserAppCoreFactory::nsBrowserAppCoreFactory(void)
{
mRefCnt=0;
IncInstanceCount();
}
nsBrowserAppCoreFactory::~nsBrowserAppCoreFactory(void)
{
DecInstanceCount();
}
NS_IMETHODIMP
nsBrowserAppCoreFactory::QueryInterface(REFNSIID aIID,void** aInstancePtr)
{
if (aInstancePtr == NULL)
{
return NS_ERROR_NULL_POINTER;
}
// Always NULL result, in case of failure
*aInstancePtr = NULL;
if ( aIID.Equals(kISupportsIID) )
{
*aInstancePtr = (void*) this;
}
else if ( aIID.Equals(kIFactoryIID) )
{
*aInstancePtr = (void*) this;
}
if (aInstancePtr == NULL)
{
return NS_ERROR_NO_INTERFACE;
}
AddRef();
return NS_OK;
}
NS_IMPL_ADDREF(nsBrowserAppCoreFactory)
NS_IMPL_RELEASE(nsBrowserAppCoreFactory)
NS_IMETHODIMP
nsBrowserAppCoreFactory::CreateInstance(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
if (aResult == NULL)
{
return NS_ERROR_NULL_POINTER;
}
*aResult = NULL;
/* do I have to use iSupports? */
nsBrowserAppCore *inst = new nsBrowserAppCore();
if (inst == NULL)
return NS_ERROR_OUT_OF_MEMORY;
nsresult result = inst->QueryInterface(aIID, aResult);
if (result != NS_OK)
delete inst;
return result;
}
NS_IMETHODIMP
nsBrowserAppCoreFactory::LockFactory(PRBool aLock)
{
if (aLock)
IncLockCount();
else
DecLockCount();
return NS_OK;
}

Просмотреть файл

@ -1,49 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsBrowserAppCoreFactory_h___
#define nsBrowserAppCoreFactory_h___
//#include "nscore.h"
//#include "nsString.h"
#include "nsIFactory.h"
#include "nsISupports.h"
////////////////////////////////////////////////////////////////////////////////
// nsBrowserAppCoreFactory:
////////////////////////////////////////////////////////////////////////////////
class nsBrowserAppCoreFactory : public nsIFactory
{
public:
nsBrowserAppCoreFactory();
virtual ~nsBrowserAppCoreFactory();
PRBool CanUnload(void);
NS_DECL_ISUPPORTS
NS_IMETHOD CreateInstance(nsISupports *aOuter,
REFNSIID aIID,
void **aResult);
NS_IMETHOD LockFactory(PRBool aLock);
};
#endif // nsBrowserAppCoreFactory_h___