Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef nsContentSecurityManager_h___
8 : #define nsContentSecurityManager_h___
9 :
10 : #include "nsIContentSecurityManager.h"
11 : #include "nsIChannel.h"
12 : #include "nsIChannelEventSink.h"
13 :
14 : class nsIStreamListener;
15 :
16 : #define NS_CONTENTSECURITYMANAGER_CONTRACTID "@mozilla.org/contentsecuritymanager;1"
17 : // cdcc1ab8-3cea-4e6c-a294-a651fa35227f
18 : #define NS_CONTENTSECURITYMANAGER_CID \
19 : { 0xcdcc1ab8, 0x3cea, 0x4e6c, \
20 : { 0xa2, 0x94, 0xa6, 0x51, 0xfa, 0x35, 0x22, 0x7f } }
21 :
22 : class nsContentSecurityManager : public nsIContentSecurityManager
23 : , public nsIChannelEventSink
24 : {
25 : public:
26 : NS_DECL_ISUPPORTS
27 : NS_DECL_NSICONTENTSECURITYMANAGER
28 : NS_DECL_NSICHANNELEVENTSINK
29 :
30 2 : nsContentSecurityManager() {}
31 :
32 : static nsresult doContentSecurityCheck(nsIChannel* aChannel,
33 : nsCOMPtr<nsIStreamListener>& aInAndOutListener);
34 :
35 : private:
36 : static nsresult CheckChannel(nsIChannel* aChannel);
37 :
38 0 : virtual ~nsContentSecurityManager() {}
39 :
40 : };
41 :
42 : #endif /* nsContentSecurityManager_h___ */
|