2000-04-02 21:19:56 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
1999-10-22 02:35:18 +00:00
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
|
|
*
|
|
|
|
* 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 the Mozilla browser.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
|
|
|
* Communications, Inc. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1999, Mozilla. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Travis Bogard <travis@netscape.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsWebBrowser_h__
|
|
|
|
#define nsWebBrowser_h__
|
|
|
|
|
2000-03-11 01:16:24 +00:00
|
|
|
// Local Includes
|
|
|
|
#include "nsDocShellTreeOwner.h"
|
2000-04-02 21:01:18 +00:00
|
|
|
#include "nsWBURIContentListener.h"
|
1999-10-26 02:26:57 +00:00
|
|
|
|
2000-03-11 01:16:24 +00:00
|
|
|
// Core Includes
|
|
|
|
#include "nsCOMPtr.h"
|
1999-10-22 02:35:18 +00:00
|
|
|
|
2000-02-14 09:39:21 +00:00
|
|
|
// Interfaces needed
|
2000-03-11 01:16:24 +00:00
|
|
|
#include "nsCWebBrowser.h"
|
2000-02-14 09:39:21 +00:00
|
|
|
#include "nsIBaseWindow.h"
|
|
|
|
#include "nsIDocShell.h"
|
2000-03-11 01:16:24 +00:00
|
|
|
#include "nsIDocShellTreeItem.h"
|
|
|
|
#include "nsIInterfaceRequestor.h"
|
2000-02-14 09:39:21 +00:00
|
|
|
#include "nsIScrollable.h"
|
2000-03-11 01:16:24 +00:00
|
|
|
#include "nsISHistory.h"
|
2000-02-14 09:39:21 +00:00
|
|
|
#include "nsISupportsArray.h"
|
|
|
|
#include "nsITextScroll.h"
|
|
|
|
#include "nsIWidget.h"
|
2000-08-16 08:50:00 +00:00
|
|
|
|
2000-02-14 09:39:21 +00:00
|
|
|
#include "nsIWebBrowser.h"
|
2000-02-24 03:51:35 +00:00
|
|
|
#include "nsIWebNavigation.h"
|
2000-03-11 01:16:24 +00:00
|
|
|
#include "nsIWebProgress.h"
|
2000-08-25 18:39:46 +00:00
|
|
|
#include "nsIWebBrowserSetup.h"
|
2000-02-14 09:39:21 +00:00
|
|
|
|
1999-10-27 02:45:49 +00:00
|
|
|
class nsWebBrowserInitInfo
|
|
|
|
{
|
|
|
|
public:
|
1999-11-17 09:00:05 +00:00
|
|
|
//nsIBaseWindow Stuff
|
2000-03-11 01:16:24 +00:00
|
|
|
PRInt32 x;
|
|
|
|
PRInt32 y;
|
|
|
|
PRInt32 cx;
|
|
|
|
PRInt32 cy;
|
|
|
|
PRBool visible;
|
|
|
|
nsCOMPtr<nsISHistory> sessionHistory;
|
|
|
|
nsString name;
|
1999-10-27 02:45:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-03-11 01:16:24 +00:00
|
|
|
class nsWebBrowser : public nsIWebBrowser,
|
|
|
|
public nsIWebNavigation,
|
2000-08-16 08:50:00 +00:00
|
|
|
public nsIWebProgress,
|
2000-08-25 18:39:46 +00:00
|
|
|
public nsIWebBrowserSetup,
|
2000-08-16 08:50:00 +00:00
|
|
|
public nsIDocShellTreeItem,
|
2000-03-11 01:16:24 +00:00
|
|
|
public nsIBaseWindow,
|
|
|
|
public nsIScrollable,
|
|
|
|
public nsITextScroll,
|
|
|
|
public nsIInterfaceRequestor
|
1999-10-22 02:35:18 +00:00
|
|
|
{
|
2000-03-11 01:16:24 +00:00
|
|
|
friend class nsDocShellTreeOwner;
|
2000-04-02 21:01:18 +00:00
|
|
|
friend class nsWBURIContentListener;
|
1999-10-22 02:35:18 +00:00
|
|
|
public:
|
2000-08-16 08:50:00 +00:00
|
|
|
nsWebBrowser();
|
2000-03-13 07:11:21 +00:00
|
|
|
|
2000-08-16 08:50:00 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
1999-10-22 02:35:18 +00:00
|
|
|
|
2000-08-16 08:50:00 +00:00
|
|
|
NS_DECL_NSIBASEWINDOW
|
|
|
|
NS_DECL_NSIDOCSHELLTREEITEM
|
|
|
|
NS_DECL_NSIINTERFACEREQUESTOR
|
|
|
|
NS_DECL_NSISCROLLABLE
|
|
|
|
NS_DECL_NSITEXTSCROLL
|
|
|
|
NS_DECL_NSIWEBBROWSER
|
|
|
|
NS_DECL_NSIWEBNAVIGATION
|
|
|
|
NS_DECL_NSIWEBPROGRESS
|
2000-08-25 18:39:46 +00:00
|
|
|
NS_DECL_NSIWEBBROWSERSETUP
|
1999-10-22 02:35:18 +00:00
|
|
|
|
|
|
|
protected:
|
2000-08-16 08:50:00 +00:00
|
|
|
virtual ~nsWebBrowser();
|
|
|
|
NS_IMETHOD InternalDestroy();
|
1999-10-22 02:35:18 +00:00
|
|
|
|
2000-08-16 08:50:00 +00:00
|
|
|
NS_IMETHOD SetDocShell(nsIDocShell* aDocShell);
|
|
|
|
NS_IMETHOD EnsureDocShellTreeOwner();
|
|
|
|
NS_IMETHOD EnsureContentListener();
|
1999-10-26 02:26:57 +00:00
|
|
|
|
1999-10-22 02:35:18 +00:00
|
|
|
protected:
|
2000-03-11 01:16:24 +00:00
|
|
|
nsDocShellTreeOwner* mDocShellTreeOwner;
|
2000-04-02 21:01:18 +00:00
|
|
|
nsWBURIContentListener* mContentListener;
|
1999-11-01 19:57:15 +00:00
|
|
|
nsCOMPtr<nsISupportsArray> mListenerList;
|
|
|
|
nsCOMPtr<nsIDocShell> mDocShell;
|
2000-03-11 01:16:24 +00:00
|
|
|
nsCOMPtr<nsIInterfaceRequestor> mDocShellAsReq;
|
|
|
|
nsCOMPtr<nsIBaseWindow> mDocShellAsWin;
|
|
|
|
nsCOMPtr<nsIDocShellTreeItem> mDocShellAsItem;
|
2000-03-14 07:05:08 +00:00
|
|
|
nsCOMPtr<nsIWebNavigation> mDocShellAsNav;
|
|
|
|
nsCOMPtr<nsIWebProgress> mDocShellAsProgress;
|
2000-03-11 01:16:24 +00:00
|
|
|
nsCOMPtr<nsIScrollable> mDocShellAsScrollable;
|
|
|
|
nsCOMPtr<nsITextScroll> mDocShellAsTextScroll;
|
|
|
|
nsCOMPtr<nsIWidget> mInternalWidget;
|
1999-11-01 19:57:15 +00:00
|
|
|
nsWebBrowserInitInfo* mInitInfo;
|
2000-07-04 21:53:27 +00:00
|
|
|
PRUint32 mContentType;
|
1999-11-01 19:57:15 +00:00
|
|
|
nativeWindow mParentNativeWindow;
|
1999-11-18 09:17:07 +00:00
|
|
|
|
|
|
|
//Weak Reference interfaces...
|
2000-03-11 01:16:24 +00:00
|
|
|
nsIWidget* mParentWidget;
|
|
|
|
nsIDocShellTreeItem* mParent;
|
1999-10-22 02:35:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsWebBrowser_h__ */
|