2001-04-13 17:05:16 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
1999-11-06 07:51:05 +03:00
|
|
|
*
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-11-06 07:51:05 +03:00
|
|
|
|
|
|
|
#ifndef nsDSURIContentListener_h__
|
|
|
|
#define nsDSURIContentListener_h__
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsIURIContentListener.h"
|
2002-07-10 01:30:13 +04:00
|
|
|
#include "nsWeakReference.h"
|
1999-11-06 07:51:05 +03:00
|
|
|
|
1999-11-12 10:28:25 +03:00
|
|
|
class nsDocShell;
|
2005-02-27 21:33:27 +03:00
|
|
|
class nsIWebNavigationInfo;
|
1999-11-06 07:51:05 +03:00
|
|
|
|
2002-07-10 01:30:13 +04:00
|
|
|
class nsDSURIContentListener :
|
|
|
|
public nsIURIContentListener,
|
|
|
|
public nsSupportsWeakReference
|
|
|
|
|
1999-11-06 07:51:05 +03:00
|
|
|
{
|
1999-11-12 10:28:25 +03:00
|
|
|
friend class nsDocShell;
|
1999-11-06 07:51:05 +03:00
|
|
|
public:
|
2001-04-13 17:05:16 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIURICONTENTLISTENER
|
1999-11-06 07:51:05 +03:00
|
|
|
|
2001-04-17 03:05:08 +04:00
|
|
|
nsresult Init();
|
|
|
|
|
1999-11-07 13:00:53 +03:00
|
|
|
protected:
|
2005-02-18 21:20:42 +03:00
|
|
|
nsDSURIContentListener(nsDocShell* aDocShell);
|
2001-04-13 17:05:16 +04:00
|
|
|
virtual ~nsDSURIContentListener();
|
1999-11-07 13:00:53 +03:00
|
|
|
|
2005-02-18 21:20:42 +03:00
|
|
|
void DropDocShellreference() {
|
|
|
|
mDocShell = nsnull;
|
|
|
|
}
|
1999-11-06 07:51:05 +03:00
|
|
|
|
2010-10-15 02:26:59 +04:00
|
|
|
// Determine if X-Frame-Options allows content to be framed
|
|
|
|
// as a subdocument
|
|
|
|
bool CheckFrameOptions(nsIRequest* request);
|
|
|
|
|
1999-11-06 07:51:05 +03:00
|
|
|
protected:
|
2001-04-13 17:05:16 +04:00
|
|
|
nsDocShell* mDocShell;
|
1999-12-21 03:09:48 +03:00
|
|
|
|
2002-07-10 01:30:13 +04:00
|
|
|
// Store the parent listener in either of these depending on
|
|
|
|
// if supports weak references or not. Proper weak refs are
|
|
|
|
// preferred and encouraged!
|
|
|
|
nsWeakPtr mWeakParentContentListener;
|
|
|
|
nsIURIContentListener* mParentContentListener;
|
|
|
|
|
2005-02-27 21:33:27 +03:00
|
|
|
nsCOMPtr<nsIWebNavigationInfo> mNavInfo;
|
1999-11-06 07:51:05 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsDSURIContentListener_h__ */
|