|
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #ifndef nsChannelPolicy_h___ |
|
7 #define nsChannelPolicy_h___ |
|
8 |
|
9 #include "nsCOMPtr.h" |
|
10 #include "nsIChannelPolicy.h" |
|
11 |
|
12 #define NSCHANNELPOLICY_CONTRACTID "@mozilla.org/nschannelpolicy;1" |
|
13 #define NSCHANNELPOLICY_CID \ |
|
14 { 0xd396b3cd, 0xf164, 0x4ce8, \ |
|
15 { 0x93, 0xa7, 0xe3, 0x85, 0xe1, 0x46, 0x56, 0x3c } } |
|
16 |
|
17 class nsChannelPolicy : public nsIChannelPolicy |
|
18 { |
|
19 public: |
|
20 NS_DECL_ISUPPORTS |
|
21 NS_DECL_NSICHANNELPOLICY |
|
22 |
|
23 nsChannelPolicy(); |
|
24 virtual ~nsChannelPolicy(); |
|
25 |
|
26 protected: |
|
27 /* Represents the type of content being loaded in the channel per |
|
28 * nsIContentPolicy, e.g. TYPE_IMAGE, TYPE_SCRIPT |
|
29 */ |
|
30 unsigned long mLoadType; |
|
31 |
|
32 /* pointer to a Content Security Policy object if available */ |
|
33 nsCOMPtr<nsISupports> mCSP; |
|
34 }; |
|
35 |
|
36 #endif /* nsChannelPolicy_h___ */ |