Chromium Code Reviews| 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 | 14 |
| 15 /** | 15 /** |
| 16 * Handles a HTTP header equivalent set by a meta tag using <meta http-equiv=".. ." content="...">. This is called | 16 * Handles a HTTP header equivalent set by a meta tag using <meta |
|
yhirano
2016/10/03 08:37:34
Moving "<meta" to the next line would be good.
Charlie Harrison
2016/10/03 12:30:05
Done.
| |
| 17 * when a meta tag is encountered during document parsing, and also when a scrip t dynamically changes or adds a meta | 17 * http-equiv="..." content="...">. This is called when a meta tag is |
| 18 * tag. This enables scripts to use meta tags to perform refreshes and set expir y dates in addition to them being | 18 * encountered during document parsing, and also when a script dynamically |
| 19 * specified in a HTML file. | 19 * 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 * file. | |
| 20 */ | 22 */ |
| 21 class HttpEquiv { | 23 class HttpEquiv { |
| 22 STATIC_ONLY(HttpEquiv); | 24 STATIC_ONLY(HttpEquiv); |
| 23 | 25 |
| 24 public: | 26 public: |
| 25 static void process(Document&, | 27 static void process(Document&, |
| 26 const AtomicString& equiv, | 28 const AtomicString& equiv, |
| 27 const AtomicString& content, | 29 const AtomicString& content, |
| 28 bool inDocumentHeadElement); | 30 bool inDocumentHeadElement); |
| 29 | 31 |
| 30 private: | 32 private: |
| 31 static void processHttpEquivDefaultStyle(Document&, | 33 static void processHttpEquivDefaultStyle(Document&, |
| 32 const AtomicString& content); | 34 const AtomicString& content); |
| 33 static void processHttpEquivRefresh(Document&, const AtomicString& content); | 35 static void processHttpEquivRefresh(Document&, const AtomicString& content); |
| 34 static void processHttpEquivSetCookie(Document&, const AtomicString& content); | 36 static void processHttpEquivSetCookie(Document&, const AtomicString& content); |
| 35 static void processHttpEquivXFrameOptions(Document&, | 37 static void processHttpEquivXFrameOptions(Document&, |
| 36 const AtomicString& content); | 38 const AtomicString& content); |
| 37 static void processHttpEquivContentSecurityPolicy( | 39 static void processHttpEquivContentSecurityPolicy( |
| 38 Document&, | 40 Document&, |
| 39 const AtomicString& equiv, | 41 const AtomicString& equiv, |
| 40 const AtomicString& content); | 42 const AtomicString& content); |
| 41 static void processHttpEquivAcceptCH(Document&, const AtomicString& content); | 43 static void processHttpEquivAcceptCH(Document&, const AtomicString& content); |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 } // namespace blink | 46 } // namespace blink |
| 45 | 47 |
| 46 #endif | 48 #endif |
| OLD | NEW |