зеркало из https://github.com/mozilla/pjs.git
Added methods to set and get the presContext for the content listener. Made nsDocShellBase a friend class so we could move the constructor and all the non-interface methods into protected area.
This commit is contained in:
Родитель
7657253dc3
Коммит
f07d391a5d
|
@ -84,6 +84,8 @@ NS_IMETHODIMP nsDSURIContentListener::DoContent(const char* aContentType,
|
|||
if(HandleInCurrentDocShell(aContentType, aCommand, aWindowTarget))
|
||||
{
|
||||
//XXX Start Load here....
|
||||
//XXX mDocShell->SetCurrentURI(nsIChannel::GetURI()));
|
||||
|
||||
}
|
||||
else
|
||||
return mParentContentListener->DoContent(aContentType, aCommand,
|
||||
|
@ -149,4 +151,15 @@ void nsDSURIContentListener::SetParentContentListener(nsIURIContentListener*
|
|||
aParentListener)
|
||||
{
|
||||
mParentContentListener = aParentListener;
|
||||
}
|
||||
}
|
||||
|
||||
void nsDSURIContentListener::GetPresContext(nsIPresContext** aPresContext)
|
||||
{
|
||||
*aPresContext = mPresContext;
|
||||
NS_IF_ADDREF(*aPresContext);
|
||||
}
|
||||
|
||||
void nsDSURIContentListener::SetPresContext(nsIPresContext* aPresContext)
|
||||
{
|
||||
mPresContext = aPresContext;
|
||||
}
|
|
@ -31,27 +31,29 @@ class nsDocShellBase;
|
|||
|
||||
class nsDSURIContentListener : public nsIURIContentListener
|
||||
{
|
||||
friend class nsDocShellBase;
|
||||
public:
|
||||
nsDSURIContentListener();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_DECL_NSIURICONTENTLISTENER
|
||||
|
||||
protected:
|
||||
nsDSURIContentListener();
|
||||
virtual ~nsDSURIContentListener();
|
||||
|
||||
void DocShellBase(nsDocShellBase* aDocShellBase);
|
||||
nsDocShellBase* DocShellBase();
|
||||
void GetParentContentListener(nsIURIContentListener** aParentListener);
|
||||
void SetParentContentListener(nsIURIContentListener* aParentListener);
|
||||
|
||||
protected:
|
||||
virtual ~nsDSURIContentListener();
|
||||
|
||||
void GetPresContext(nsIPresContext** aPresContext);
|
||||
void SetPresContext(nsIPresContext* aPresContext);
|
||||
PRBool HandleInCurrentDocShell(const char* aContentType,
|
||||
const char* aCommand, const char* aWindowTarget);
|
||||
|
||||
protected:
|
||||
nsDocShellBase* mDocShell;
|
||||
nsCOMPtr<nsIURIContentListener> mParentContentListener;
|
||||
nsCOMPtr<nsIPresContext> mPresContext;
|
||||
};
|
||||
|
||||
#endif /* nsDSURIContentListener_h__ */
|
||||
|
|
Загрузка…
Ссылка в новой задаче