mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Changed nsWebBrowser to support nsIWebProgress instead of nsIProgress. Made the new nsDocShellTreeOwner a friend.
This commit is contained in:
parent
b476940bd0
commit
454da4c056
@ -23,48 +23,62 @@
|
|||||||
#ifndef nsWebBrowser_h__
|
#ifndef nsWebBrowser_h__
|
||||||
#define nsWebBrowser_h__
|
#define nsWebBrowser_h__
|
||||||
|
|
||||||
|
// Local Includes
|
||||||
|
#include "nsDocShellTreeOwner.h"
|
||||||
|
|
||||||
|
// Core Includes
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
|
|
||||||
#include "nsCWebBrowser.h"
|
|
||||||
|
|
||||||
// Interfaces needed
|
// Interfaces needed
|
||||||
|
#include "nsCWebBrowser.h"
|
||||||
#include "nsIBaseWindow.h"
|
#include "nsIBaseWindow.h"
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsIProgress.h"
|
#include "nsIDocShellTreeItem.h"
|
||||||
|
#include "nsIInterfaceRequestor.h"
|
||||||
#include "nsIScrollable.h"
|
#include "nsIScrollable.h"
|
||||||
|
#include "nsISHistory.h"
|
||||||
#include "nsISupportsArray.h"
|
#include "nsISupportsArray.h"
|
||||||
#include "nsITextScroll.h"
|
#include "nsITextScroll.h"
|
||||||
#include "nsIWidget.h"
|
#include "nsIWidget.h"
|
||||||
#include "nsIWebBrowser.h"
|
#include "nsIWebBrowser.h"
|
||||||
#include "nsIWebNavigation.h"
|
#include "nsIWebNavigation.h"
|
||||||
|
#include "nsIWebProgress.h"
|
||||||
|
|
||||||
class nsWebBrowserInitInfo
|
class nsWebBrowserInitInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//nsIBaseWindow Stuff
|
//nsIBaseWindow Stuff
|
||||||
/* nativeWindow parentNativeWindow;
|
PRInt32 x;
|
||||||
nsCOMPtr<nsIWidget> parentWidget; */
|
PRInt32 y;
|
||||||
PRInt32 x;
|
PRInt32 cx;
|
||||||
PRInt32 y;
|
PRInt32 cy;
|
||||||
PRInt32 cx;
|
PRBool visible;
|
||||||
PRInt32 cy;
|
nsCOMPtr<nsISHistory> sessionHistory;
|
||||||
PRBool visible;
|
nsString name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class nsWebBrowser : public nsIWebBrowser, public nsIWebNavigation,
|
class nsWebBrowser : public nsIWebBrowser,
|
||||||
public nsIProgress, public nsIBaseWindow, public nsIScrollable,
|
public nsIDocShellTreeItem,
|
||||||
public nsITextScroll
|
public nsIWebNavigation,
|
||||||
|
public nsIWebProgress,
|
||||||
|
public nsIBaseWindow,
|
||||||
|
public nsIScrollable,
|
||||||
|
public nsITextScroll,
|
||||||
|
public nsIInterfaceRequestor
|
||||||
{
|
{
|
||||||
|
friend class nsDocShellTreeOwner;
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
||||||
NS_DECL_NSIWEBBROWSER
|
|
||||||
NS_DECL_NSIWEBNAVIGATION
|
|
||||||
NS_DECL_NSIPROGRESS
|
|
||||||
NS_DECL_NSIBASEWINDOW
|
NS_DECL_NSIBASEWINDOW
|
||||||
|
NS_DECL_NSIDOCSHELLTREEITEM
|
||||||
|
NS_DECL_NSIINTERFACEREQUESTOR
|
||||||
NS_DECL_NSISCROLLABLE
|
NS_DECL_NSISCROLLABLE
|
||||||
NS_DECL_NSITEXTSCROLL
|
NS_DECL_NSITEXTSCROLL
|
||||||
|
NS_DECL_NSIWEBBROWSER
|
||||||
|
NS_DECL_NSIWEBNAVIGATION
|
||||||
|
NS_DECL_NSIWEBPROGRESS
|
||||||
|
|
||||||
static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void** ppv);
|
static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void** ppv);
|
||||||
|
|
||||||
@ -73,19 +87,26 @@ protected:
|
|||||||
virtual ~nsWebBrowser();
|
virtual ~nsWebBrowser();
|
||||||
|
|
||||||
void UpdateListeners();
|
void UpdateListeners();
|
||||||
nsresult CreateDocShell(const PRUnichar* contentType);
|
NS_IMETHOD SetDocShell(nsIDocShell* aDocShell);
|
||||||
|
NS_IMETHOD EnsureDocShellTreeOwner();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
nsDocShellTreeOwner* mDocShellTreeOwner;
|
||||||
nsCOMPtr<nsISupportsArray> mListenerList;
|
nsCOMPtr<nsISupportsArray> mListenerList;
|
||||||
nsCOMPtr<nsIDocShell> mDocShell;
|
nsCOMPtr<nsIDocShell> mDocShell;
|
||||||
PRBool mCreated;
|
nsCOMPtr<nsIInterfaceRequestor> mDocShellAsReq;
|
||||||
nsWebBrowserInitInfo* mInitInfo;
|
nsCOMPtr<nsIBaseWindow> mDocShellAsWin;
|
||||||
nsCOMPtr<nsIWidget> mParentWidget;
|
nsCOMPtr<nsIDocShellTreeItem> mDocShellAsItem;
|
||||||
nativeWindow mParentNativeWindow;
|
nsCOMPtr<nsIWebNavigation> mDocShellAsNav;
|
||||||
|
nsCOMPtr<nsIScrollable> mDocShellAsScrollable;
|
||||||
|
nsCOMPtr<nsITextScroll> mDocShellAsTextScroll;
|
||||||
nsCOMPtr<nsIWidget> mInternalWidget;
|
nsCOMPtr<nsIWidget> mInternalWidget;
|
||||||
|
nsWebBrowserInitInfo* mInitInfo;
|
||||||
|
nativeWindow mParentNativeWindow;
|
||||||
|
|
||||||
//Weak Reference interfaces...
|
//Weak Reference interfaces...
|
||||||
nsIWebBrowserChrome* mTopLevelWindow;
|
nsIWidget* mParentWidget;
|
||||||
|
nsIDocShellTreeItem* mParent;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsWebBrowser_h__ */
|
#endif /* nsWebBrowser_h__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user