Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
empty_html_filter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
19 #ifndef PAGESPEED_KERNEL_HTML_EMPTY_HTML_FILTER_H_
20 #define PAGESPEED_KERNEL_HTML_EMPTY_HTML_FILTER_H_
21 
24 
25 namespace net_instaweb {
26 
27 class HtmlCdataNode;
28 class HtmlCharactersNode;
29 class HtmlCommentNode;
30 class HtmlDirectiveNode;
31 class HtmlElement;
32 class HtmlIEDirectiveNode;
33 
37 class EmptyHtmlFilter : public HtmlFilter {
38  public:
40  virtual ~EmptyHtmlFilter();
41 
42  virtual void StartDocument();
43  virtual void EndDocument();
44  virtual void StartElement(HtmlElement* element);
45  virtual void EndElement(HtmlElement* element);
46  virtual void Cdata(HtmlCdataNode* cdata);
47  virtual void Comment(HtmlCommentNode* comment);
48  virtual void IEDirective(HtmlIEDirectiveNode* directive);
49  virtual void Characters(HtmlCharactersNode* characters);
50  virtual void Directive(HtmlDirectiveNode* directive);
51  virtual void Flush();
52  virtual void DetermineEnabled(GoogleString* disabled_reason);
53 
56  virtual bool CanModifyUrls() { return false; }
57 
60  ScriptUsage GetScriptUsage() const override { return kNeverInjectsScripts; }
61 
64 };
65 
66 }
67 
68 #endif
Definition: html_filter.h:35
virtual void Comment(HtmlCommentNode *comment)
Called for HTML comments that aren't IE directives (e.g. ).
Leaf node representing raw characters in HTML.
Definition: html_node.h:167
Definition: empty_html_filter.h:37
Indicates this filter never injects scripts.
Definition: html_filter.h:55
Definition: html_element.h:42
ScriptUsage GetScriptUsage() const override
Definition: empty_html_filter.h:60
virtual void DetermineEnabled(GoogleString *disabled_reason)
virtual void Cdata(HtmlCdataNode *cdata)
Called for CDATA blocks (e.g. <![CDATA[foobar]]>)
Leaf node representing an HTML comment.
Definition: html_node.h:193
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
virtual bool CanModifyUrls()
Definition: empty_html_filter.h:56
ScriptUsage
Describes a filter's relationship with scripts.
Definition: html_filter.h:38
virtual void StartElement(HtmlElement *element)
Leaf node representing an HTML directive.
Definition: html_node.h:233
Leaf node representing a CDATA section.
Definition: html_node.h:147
Leaf node representing an HTML IE directive.
Definition: html_node.h:213
virtual void IEDirective(HtmlIEDirectiveNode *directive)
virtual void Characters(HtmlCharactersNode *characters)
Called for raw characters between tags.
virtual void Directive(HtmlDirectiveNode *directive)
Called for HTML directives (e.g. <!doctype foobar>).