OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef HttpEquiv_h | 5 #ifndef HttpEquiv_h |
6 #define HttpEquiv_h | 6 #define HttpEquiv_h |
7 | 7 |
8 #include "wtf/Allocator.h" | 8 #include "wtf/Allocator.h" |
9 #include "wtf/text/AtomicString.h" | 9 #include "wtf/text/AtomicString.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class Document; | 13 class Document; |
| 14 class Element; |
14 | 15 |
15 /** | 16 /** |
16 * Handles a HTTP header equivalent set by a meta tag using | 17 * Handles a HTTP header equivalent set by a meta tag using |
17 * <meta http-equiv="..." content="...">. This is called when a meta tag is | 18 * <meta http-equiv="..." content="...">. This is called when a meta tag is |
18 * encountered during document parsing, and also when a script dynamically | 19 * encountered during document parsing, and also when a script dynamically |
19 * changes or adds a meta tag. This enables scripts to use meta tags to perform | 20 * changes or adds a meta tag. This enables scripts to use meta tags to perform |
20 * refreshes and set expiry dates in addition to them being specified in a HTML | 21 * refreshes and set expiry dates in addition to them being specified in a HTML |
21 * file. | 22 * file. |
22 */ | 23 */ |
23 class HttpEquiv { | 24 class HttpEquiv { |
24 STATIC_ONLY(HttpEquiv); | 25 STATIC_ONLY(HttpEquiv); |
25 | 26 |
26 public: | 27 public: |
27 static void process(Document&, | 28 static void process(Document&, |
28 const AtomicString& equiv, | 29 const AtomicString& equiv, |
29 const AtomicString& content, | 30 const AtomicString& content, |
30 bool inDocumentHeadElement); | 31 bool inDocumentHeadElement, |
| 32 Element*); |
31 | 33 |
32 private: | 34 private: |
33 static void processHttpEquivDefaultStyle(Document&, | 35 static void processHttpEquivDefaultStyle(Document&, |
34 const AtomicString& content); | 36 const AtomicString& content); |
35 static void processHttpEquivRefresh(Document&, const AtomicString& content); | 37 static void processHttpEquivRefresh(Document&, |
36 static void processHttpEquivSetCookie(Document&, const AtomicString& content); | 38 const AtomicString& content, |
| 39 Element*); |
| 40 static void processHttpEquivSetCookie(Document&, |
| 41 const AtomicString& content, |
| 42 Element*); |
37 static void processHttpEquivXFrameOptions(Document&, | 43 static void processHttpEquivXFrameOptions(Document&, |
38 const AtomicString& content); | 44 const AtomicString& content); |
39 static void processHttpEquivContentSecurityPolicy( | 45 static void processHttpEquivContentSecurityPolicy( |
40 Document&, | 46 Document&, |
41 const AtomicString& equiv, | 47 const AtomicString& equiv, |
42 const AtomicString& content); | 48 const AtomicString& content); |
43 static void processHttpEquivAcceptCH(Document&, const AtomicString& content); | 49 static void processHttpEquivAcceptCH(Document&, const AtomicString& content); |
44 }; | 50 }; |
45 | 51 |
46 } // namespace blink | 52 } // namespace blink |
47 | 53 |
48 #endif | 54 #endif |
OLD | NEW |